When trying to connect to MySQL running on a local network I'm getting the error message:
Host 'XXX' is not allowed to connect to this MySQL server.
Disclaimer (MySQL Ver 8)
The answers provided bellow do not solve te problem in MySQL v8
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)
The solution provided in these old answers are returning the following error in MySQL Ver 8.0.13.
GRANT ALL PRIVILEGES ON mysql.* TO root@localhost IDENTIFIED BY 'pass123' WITH GRANT OPTION;
Or
Grant All Privileges ON *.* to 'root'@'%' Identified By 'pass123';
Output message:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'pass123' WITH GRANT OPTION' at line 1