MySQL 8.0.32 安装步骤
- 下载:
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.32-1.el7.x86_64.rpm-bundle.tar
- 解压:
tar -xvf mysql-8.0.32-1.el7.x86_64.rpm-bundle.tar
- 安装:
ls *.rpm|xargs rpm -ivh -i --force --nodeps
- 启动:
service mysqld restart
- 查看:
grep 'temporary password' /var/log/mysqld.log
- 登录:
mysql -uroot -p
- 修改:
alter user 'root'@'localhost' IDENTIFIED BY '新密码';
需要给root用户开启远程访问,需操作8-10步骤,不开启远程访问,至此结束
- 使用:
use mysql;
- 修改:
update user set host='%' where user='root';
- 刷新:
flush privileges;