linux 部署mysql
wget https://repo.mysql.com/mysql57-community-release-el7.rpm
yum -y install mysql57-community-release-el7.rpm
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2024
yum install -y mysql-community-server
// 启动服务并查看服务状态
//启动服务
systemctl start mysqld
//查看服务状态
systemctl status mysqld
//置开机启动
systemctl enable mysqld
systemctl daemon-reload
grep "password" /var/log/mysqld.log
// 登录并修改密码
mysql -u root -p
// 修改密码并刷新
mysql> alter user 'root'@'localhost' identified by 'Aa#123456';
mysql> flush privileges;
mysql> grant all privileges on *.* to root@'%' identified by "修改后的密码";