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';  修改远程链接

posted @ 2023-01-31 18:10  今晚再打老虎  阅读(6)  评论(0编辑  收藏  举报