How to enable remote access to MySQL server on Plesk?

Follow

Comments

10 comments

  • Avatar
    adrianTNT

    Server was not responding when I tried from my local windows machine with command: telnet example.com 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

    Worked.

    1
    Comment actions Permalink
  • 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.

    1
    Comment actions Permalink
  • 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

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Veronica

    Hello!
    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". 

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Veronica

    Glad to hear that. Thank you for the feedback.

    0
    Comment actions Permalink
  • Avatar
    iamkingsleyf

    Hello;

     

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

    0
    Comment actions Permalink
  • Avatar
    Pavel Mikhaylov (Edited )

    Hello,

    That is not possible as MySQL has its own users.

    0
    Comment actions Permalink
  • Avatar
    stathopon

    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?

    0
    Comment actions Permalink
  • 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 example.com 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:

    Trying 203.0.113.2...
    Connected 203.0.113.2.
    Escape character is '^]'.
    b
    5.5.5-10.1.37-MariaDB-0+deb9u1
    > 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

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request