How to enable remote access to MySQL database server


2016-11-16 12:41:14 UTC


2017-08-18 11:44:13 UTC


Was this article helpful?

Have more questions?

Submit a request

How to enable remote access to MySQL database server

Applicable to:

  • Plesk


How to enable remote access to MySQL database server?


By default, Plesk administrator user does not have a remote access. It is recommended to create a new user that will be used for remote access. 

In order to enable remote access to MySQL server, follow instructions below:

  1. Login to MySQL server

    Note: For the access to client's MySQL server on Windows, use PHPMyAdmin: Plesk > Tools & Settings > Database Servers - MySQL DB Admin
  2. Grant access to remote IP address and login to MySQL. For example, if you want to allow access to database called database for user user with password password and remote IP address

    mysql> GRANT ALL ON database.* TO user@'' IDENTIFIED BY 'password';

    Note: to allow connections from any IP address use ' % ' character.

  3. Make sure that MySQL server is listening on the correct IP address.

    For Windows:

    netstat -anp tcp | findstr 8306

    netstat -anp tcp | findstr 3306

    For Linux:

    [root@server ~]# netstat -anp | grep :3306
    tcp 0 0* LISTEN 13151/mysqld
  4. If not, check that skip-networking parameter is not defined and correct IP address is set for bind-address parameter in my.cnf/my.ini file located in:

    For Linux:
    /etc/mysql/my.cnf Debian/Ubuntu
    /etc/my.cnf CentOS/CloudLinux/RHEL
    For Windows:
    "%plesk_dir%\MySQL\my.ini" for Plesk databases(port 8306)
    "%plesk_dir%\Databases\MySQL\my.ini" for Clients databases(port 3306)

    After that, restart MySQL server.

  5. Make sure that bind-address option is set to :: or in my.cnf/my.ini
  6. Make sure that Allow remote connections from any host option is enabled in Tools & Settings > Database Servers > Settings
Have more questions? Submit a request


  • 1

    Server was not responding when I tried from my local windows machine with command: telnet 3306 

    Without the above user editing, I just edited /etc/my.cnf and I changed to:

    bind-address = ::

    This is how it was on a previous plesk server by default. 

    Then restarted db with:

    service mariadb restart


  • 0
    Andrey Ivanov

    Hello Adrian,

    Thank you for the feedback, the article was updated with additional details. Kindly note, that if the address is set to ::, the server accepts TCP/IP connections on all server host IPv4 and IPv6 interfaces.

Please sign in to leave a comment.