当试图连接到运行在本地网络上的MySQL时,我收到了错误消息:
Host 'XXX' is not allowed to connect to this MySQL server.免责声明(MySQL Ver 8)
所提供的答案并不能解决MySQL v8中的te问题。
Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server
host 'localhost' is not allowed to connect to this MySQL server (#1130)
这些旧答案中提供的解决方案返回了MySQL Ver 8.0.13中的以下错误。
GRANT ALL PRIVILEGES ON mysql.* TO root@localhost IDENTIFIED BY 'pass123' WITH GRANT OPTION;或
Grant All Privileges ON *.* to 'root'@'%' Identified By 'pass123'; 输出信息:
错误1064 (42000):您的SQL语法出现了错误;请检查与您的MySQL服务器版本对应的手册,以便在第1行使用“pass123标识”和“GRANT选项”附近使用正确的语法。
发布于 2019-01-12 16:13:10
V8中的GRANT语法已经更改,您不再需要或被允许使用IDENTIFIED ..部件。
CREATE USER 'fred'@'localhost' IDENTIFIED BY 'password';
GRANT All ON db.* to 'fred'@'%'; 或者去你本地局域网的任何地方,也许像这样
GRANT All ON db.* to 'fred'@'10.0.0'; https://stackoverflow.com/questions/54161270
复制相似问题