mysql-安装01

rpm -qa | grep mysql

rpm -e mysql  // 普通删除模式

rpm -e --nodeps mysql  // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除

主要要清理空目录:/var/log/mysql.log  /var/lib/mysql   /etc/my.cnf  /usr/bin/mysql 等

 

到官网找相关安装包下载

地址:https://dev.mysql.com/downloads/mysql/

wget  https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.15-1.el7.x86_64.rpm-bundle.tar

tar -xf    mysql-8.0.15-1.el7.x86_64.rpm-bundle.tar

rmp  -ivh    mysql-community-*.rpm

ps -ef |grep mysql

systemctl start mysqld  

vim /etc/my.cnf

skip-grant-tables  #添加跳过密码检查

systemctl start mysqld

 

mysql —uroot

>alter user  “root”@”localhost” identified by “REMYshishabi@123”;

>flush privileges;

>quit

删除skip-grant-tables 字段

systemctl start mysqld  #重启服务

posted @ 2020-09-16 05:27  舍&得  阅读(54)  评论(0)    收藏  举报