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'; 修改远程链接
标签:set,log,mysql8,安装,tk4,user,mysql,root From: https://www.cnblogs.com/elsons/p/17080131.html