Ri Xu Online

Enable Remote Access to MySQL Server on Windows

On Linux, we can easily enable remote access to MySQL server, here is an article talking about that. On Windows, the approach is different.

Here's the steps:

$ mysql -u root --password=
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';

USERNAME is the username to be created.
IP is the public IP address of the remote connection.
PASSWORD is the password to be assigned for this username.
(IP can be replaced with % to allow this user to logon from any host or IP)

mysql> FLUSH PRIVILEGES;
mysql> exit;
Exit mobile version