How to enable remote access to MySQL server on Plesk?




  • Avatar

    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


  • Avatar
    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.

  • Avatar
    Unknown User

    hi, I tried several times to do this procedure, but with vi when he tells me that I do not have write permissions, in the root I have enabled all writing services, but when I use it tells me that I do not have the services and I do not does not even save with: w! o: wq! you can help me courteously


  • Avatar
    Ivan Postnikov


    Please, make sure that vi should be started with root privileges (in case you are logged in not as root user use command "sudo vi").

    Also, try another text editor like "nano". 

  • Avatar
    Unknown User

    Thanks Iv

    an Postnikov

    for the help, I solved the problem by asking and then releasing as an administrator with the "su" command

    Osa I managed to synchronize the two db and everything works perfectly

    Excellent tutorial

  • Avatar
    Ivan Postnikov


    Glad to hear that. Thank you for the feedback.

  • Avatar



    I want my my site user/system user to have access to mysqldump utility so i can use it for Jetpack vaultpress backup

  • Avatar
    Pavel Mikhaylov (Edited )


    That is not possible as MySQL has its own users.

  • Avatar

    How can i check if MySQL port is not blocked by a firewall?


    what can i do to have access from 2 ips in MYSQL?

  • Avatar
    Nikita Nikushkin (Edited )

    Hi @stathopon,

    > "How can i check if MySQL port is not blocked by a firewall?"

    You can try to connect to its port by using, e.g. the "telnet" utility:

    # telnet 3306

    If the next output was returned:

    telnet: Unable to connect to remote host: Connection refused

    then the connection is blocked by a firewall, otherwise, you will see something similar to:

    Escape character is '^]'.
    > what can i do to have access from 2 ips in MYSQL?

    It can be achieved by performing the next actions:

    1. Install Plesk Firewall:

    How to install Plesk Firewall?

    2. Go to "Plesk > Tools & Settings > Firewall"
    3. Click the "Enable Firewall Rules Management > Enable" buttons

    !!!Warning: if you have already previously manually added rules in iptables they will be removed

    4. Press the "Modify Plesk Firewall Rules" button and then click the "MySQL server" rule
    5. Switch the "Action" directive to the "Allow from selected sources, deny from others" option
    6. Specify the required IPs in the "Add IP address or network" field and press the "Add" button
    7. Press the "OK > Apply Changes > Activate" buttons

Please sign in to leave a comment.

Have more questions? Submit a request