关于客户端连接mysql的授权问题

mysql远程连接 Host * is not allowed to connect to this MySQL server的错误。

是因为mysql需要授权才能访问。授权方式:

授权给某一个ip:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.3' IDENTIFIED BY 'root' WITH GRANT OPTION;

授权给所有ip:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

posted on 2017-06-07 00:35  张小贱1987  阅读(372)  评论(0编辑  收藏  举报

导航