Home:ALL Converter>MySQL Server Remote Access Denied

MySQL Server Remote Access Denied

Ask Time:2018-07-13T21:31:20         Author:mrgou

Json Formatter

I'm setting up a Dev server with MySQL 8.0, and am trying to connect remotely as root with Workbench from my laptop. This gets me an access denied error, so, trying to apply solutions provided elsewhere, i.e. GRANT ALL PRIVILEGES..., I'm still not getting there. Maybe something changed since these solutions where posted (e.g. [Enable remote MySQL connection: ERROR 1045 (28000): Access denied for user).

From the server:

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -ppassword
mysql> grant all privileges on *.* to 'root'@'%' identified by 'password';

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 'password'' at line 1

If I remove the part the message complains about:

mysql> grant all privileges on *.* to 'root'@'%';

ERROR 1410 (42000): You are not allowed to create a user with GRANT

Any suggestion?

Thanks!

R.

Author:mrgou,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51326321/mysql-server-remote-access-denied
yy