tk4 安装mysql8
sudo yum install mysql-server
service mysqld restart
grep "temporary password" /var/log/mysqld.log -- 查看临时密码
mysql -u root -p
update user set authentication_string='' where user='root'; 先将密码设置为空
flush privileges; 刷新
exit; 推出
mysql -u root -p 重新登录
alter user 'root'@'localhost' identified by 'Admin2022!'; 修改密码
use mysql
update user set host = '%' where user ='root'; 修改远程链接