Centos8遠程連接mysql報You are not allowed to create a user with GRANT錯誤

解決辦法

#1. 修改root去配置
mysql -uroot -p
use mysql
# 修改鏈接權限
update user set host='%' where user ='root';
# 更改加密方式
update user set plugin='mysql_native_password' where user ='root';

# 允許所有IP鏈接
grant all on *.* to 'root'@'%';

# 刷新
flush privileges;

搞定

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章