mysql连接报错

本地root连接mysql 显示错误

host '127.0.0.1' is not allowed to connect to this mysql server

登录数据库

mysql -u root -p

 

use mysql

grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;

 

flush privileges;

 

posted @ 2020-03-25 20:30  jack-kaller  阅读(98)  评论(0编辑  收藏  举报