下载mysql安装包
mysql-community-common-5.7.18-1.el7.x86_64.rpm
mysql-community-libs-5.7.18-1.el7.x86_64.rpm
mysql-community-client-5.7.18-1.el7.x86_64.rpm
mysql-community-server-5.7.18-1.el7.x86_64.rpm
安装net-tools
yum install net-tools
卸载系统自带的mysql-libs
yum remove mysql-libs
安装mysql
rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm
修改密码
在 /var/log/mysqld.log中找到临时密码
mysql -uroot -p$PASSWORD
alter user 'root'@'localhost' identified by 'Abc@12345678'
网友评论