"is not allowed to connect" mysql

好像过几次,安装mysql时,总会遇到这个问题。

每次都忘怎么解决。 这回写下来吧。 

编辑 mysql数据库的 user表太麻烦了, 最简单的方法是加一个用户,以后就用这个用户登录

CREATE USER 'mysql'@'客户端IP' IDENTIFIED BY 'mysql';
GRANT ALL PRIVILEGES ON *.* TO 'mysql'@'客户端IP'  WITH GRANT OPTION;

参考:

http://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server

原文地址:https://www.cnblogs.com/johnsonshu/p/4767761.html