步骤一:首先下载mysql的yum源配置
1 | wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
步骤二:安装mysql的yum源
1 | yum -y install mysql57-community-release-el7-11.noarch.rpm
步骤三:yum方式安装mysql
1 | yum -y install mysql-server --nogpgcheck
步骤四:使用mysql
1 | systemctl start mysqld.service
2 | systemctl status mysql.service
cat /var/log/mysqld.log| grep password
步骤五: 进入命令行mysql
步骤六: 修改数据库密码
ALTER USER USER() IDENTIFIED BY '123456@Aa';
grant all privileges on *.* to 'root'@'%' identified by '123456A@a' with grant option;
flush privileges;