message from server: "Host 'XXX' is not allowed to connect to this MySQL server

Access denied for user 'root'@'XXXXX' (using password: YES)

mysql命令不正确造成;

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

flush privileges

原文地址:https://www.cnblogs.com/herosoft/p/5687479.html