How to Allow Remote Connection to MySQL Server in Windows?

This article will assist you to enable remote access to MySQL server through Windows command prompt. However, the following steps can also be performed in MySQL command-line client or phpMyAdmin.

  1. Open command prompt. (Press Start + R, type cmd in Run box and hit Enter)

    Run Box

  2. At command prompt, navigate to path C:\Program Files\MySQL\MySQL Server 5.X\bin and run following command. It will prompt you for the password of MySQL root user. Enter password and MySQL prompt will be displayed.

    mysql -u root -p
  3. At MySQL prompt, create a remote user account with root privileges, run the following commands.

    MySQL Prompt

    GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
    USERNAME: Username you wish to connect to MySQL server.
    IP: Public IP address from where you wish to allow access to MySQL server.
    PASSWORD: Password of the username used.
    IP can be replaced with % to allow user to connect from any IP address.

  4. Flush the previleges by following command and exit.

    FLUSH PRIVILEGES;
    exit;


Looking for help on allowing Remote MySQL access on Linux Server? Do not forget to check our KB on How to Allow Remote Connection to MySQL Server in cPanel/WHM Server?


  • 0 Users Found This Useful

Was this answer helpful?


Related Articles

How to Enable Relation View in phpMyAdmin?

The option Relation View is probably one of the best features available in phpMyadmin. Sometimes...

Fix :: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found

Error Message ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no...

How do I connect to MySQL server from phpMyAdmin?

This article will guide you on how to connect to MySQL server from phpMyAdmin. You can obtain...

How to change phpMyAdmin password?

Following tutorial will guide you to reset the phpMyAdmin password. We assume that you have...

Fix - Collection Max error, Cannot Connect to Server

Problem Statement Recently one of our customers was unable to connect to Collection Max and...