当前位置:网站首页>MySQL的 安装、配置、卸载
MySQL的 安装、配置、卸载
2022-06-23 16:44:00 【用户7353950】
Mysql的安装配置(基于Centos7)
安装mysql数据库
[[email protected] ~]# wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
[[email protected] ~]# yum -y install mysql57-community-release-el7-9.noarch.rpm
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] ~]# yum -y install mysql-server启动数据库
[[email protected] ~]# systemctil start mysqld查询初始化数据库密码
[[email protected] ~]# grep 'passowrd' /var/log/mysql.log
--显示的 [email protected]: ***就是初始化的数据库登录密码登录到数据库
[[email protected] ~]# mysql -uroot -p
[[email protected] ~]# password:设置密码
mysql> set password for 用户名@localhost = password('新密码');查看密码设置
mysql> show variables like 'validate_password%';修改密码等级为低
mysql> set global validate_password_policy=LOW;改密码长度最小为6位
mysql> set global validate_password_length=6;设置数据库新密码
mysql> set password for 'root'@'localhost' = password('bigdata');开启远程访问数据库
mysql> grant all privileges on *.* to 'root'@'%' identified by 'bigdata' with grant option;mysql> flush privileges;Mysql的完全卸载(基于Centos7)
查询与mysql有关的rpm包
[[email protected] ~]# rpm -qa |grep -i mysql
mysql57-community-release-el7-9.noarch
mysql-community-client-5.7.32-1.el7.x86_64
mysql-community-libs-5.7.32-1.el7.x86_64
mysql-community-libs-compat-5.7.32-1.el7.x86_64
mysql-community-common-5.7.32-1.el7.x86_64
mysql-community-server-5.7.32-1.el7.x86_64使用yum remove命令卸载这些包
[[email protected] ~]# yum remove mysql57-community-release-el7-9.noarch
[[email protected] ~]# yum remove mysql-community-client-5.7.32-1.el7.x86_64
[[email protected] ~]# yum remove mysql-community-libs-5.7.32-1.el7.x86_64
[[email protected] ~]# yum remove mysql-community-libs-compat-5.7.32-1.el7.x86_64
[[email protected] ~]# yum remove mysql-community-common-5.7.32-1.el7.x86_64
[[email protected] ~]# yum remove mysql-community-server-5.7.32-1.el7.x86_64查找mysql的相关目录残留并删除
[[email protected] ~]# find / -name mysql
/etc/selinux/targeted/active/modules/100/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql删除残留
[[email protected] ~]# rm -rf /etc/selinux/targeted/active/modules/100/mysql
[[email protected] ~]# rm -rf /var/lib/mysql
[[email protected] ~]# rm -rf /var/lib/mysql/mysql
[[email protected] ~]# rm -rf /usr/share/mysql删除/var/log/mysqld.log
[[email protected] ~]# rm -rf /var/log/mysqld.log
--如果不删除这个文件,会导致新安装的mysql无法生存新密码,造成无法登陆mysql边栏推荐
- Easyplayer mobile terminal plays webrtc protocol for a long time. Pressing the play page cannot close the "about us" page
- ABP framework - data access infrastructure (Part 2)
- What can the accelerated implementation of digital economy bring to SMEs?
- WebSocket能干些啥?
- Online communication - the combination of machine learning and knowledge reasoning in trusted machine learning (Qing Yuan talk, issue 20, Li Bo)
- 使用Jmeter进行性能测试及性能监控平台搭建
- Comparison of asemi Schottky diode and ultrafast recovery diode in switching power supply
- Importance and purpose of test
- 千呼万唤,5G双卡双通到底有多重要?
- ASEMI快恢复二极管RS1M、US1M和US1G能相互代换吗
猜你喜欢

What does the timestamp 90K mean?

Hands on data analysis unit 2 section 4 data visualization
![[qsetting and.Ini configuration files] and [create resources.qrc] in QT](/img/67/85a5e7f6ad4220600acd377248ef46.png)
[qsetting and.Ini configuration files] and [create resources.qrc] in QT

Digital twin excavator of Tupu software realizes remote control

EasyPlayer移动端播放webrtc协议时长按播放页面无法关闭“关于我们”页面

Online communication - the combination of machine learning and knowledge reasoning in trusted machine learning (Qing Yuan talk, issue 20, Li Bo)

官方零基础入门 Jetpack Compose 的中文课程来啦

图扑软件以轻量化建模构建智慧城市

Redis cluster operation method

Can the asemi fast recovery diodes RS1M, us1m and US1G be replaced with each other
随机推荐
How to select securities companies? Is it safe to open a mobile account?
解答02:Smith圆为什么能“上感下容 左串右并”?
Spdlog logging example - create a logger using sink
QT layout manager [qvboxlayout, qhboxlayout, qgridlayout]
一文入门智能开关的3种功能形态
ASEMI快恢复二极管RS1M、US1M和US1G能相互代换吗
Huawei mobile phones install APK through ADB and prompt "the signature is inconsistent. The application may have been modified."
Robot Orientation and some misunderstandings in major selection in college entrance examination
官方零基础入门 Jetpack Compose 的中文课程来啦
What does the timestamp 90K mean?
炒股买股票需要怎么选择呢?安全性不错的?
【网络通信 -- WebRTC】WebRTC 源码分析 -- PacingController 相关知识点补充
mysql-选择使用Repeatable read的原因
Is it cost-effective to buy a long-term financial product?
ABAP essay - material master data interface enhancement
Redis cluster operation method
Identify and stop the process that's listening on port 8080 or configure this application
B. Integers Shop-Hello 2022
Bypass rights
查数据库中每张表的大小