• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

MySql Remote Access - How To

G

glennj

Guest
OK, this has been covered before, but I searched the forum and could only ever find part of the solution.

This is how to do it!

Firstly check your /etc/my.conf file to make sure "skip-networking" is not enabled. If it is, comment it out.

# skip-networking

and save the file.

Now restart the MySql service

service mysqld restart

If you are using the Firewall component of Plesk make sure the MySql Server allows incoming requests (I limit this by my workstation's Internet IP address... don't like the idea of having it open to whole world).

Now in an SSH shell you need to add a MySql user (or you could update an existing user).

mysql -uadmin -pyourpasswd mysql

the password will be the same as your Plesk Admin password.

then use the following command to add your user

GRANT ALL PRIVILEGES ON *.* TO 'your_username'@'%'
IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

Obviously using your preferred username and password.

To allow connection from only a specific IP/Host change the % to that IP/Host.

You should now be able to connect with something like SQLYog.

:D
 
Back
Top