• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Database Remote Access

Andrew_Pa

Regular Pleskian
Hello to everyone!

I would like to connect an external software to a database on my plesk server.

I check my firewall settings(on Plesk) and MySQL Server setting is set to Allow incoming from all.

But When I try to telnet port 3306 I get Connection refuse.

Please can you help me, what should I do to establish the connection?

PS: I have the latest update of Plesk,
 
If you get a connection refused in telnet then the most likely issue is the firewall.

Try:

iptables -v -n -L | less

to see if port 3306 is really open.

If not, then try opening a random custom port -- 3307, say -- and see if that comes into effect or not.
If it doesn't then check that you don't have any other firewall scripts conflicting with the Plesk one.
 
Edit /etc/my.cnf, run:

Code:
vi /etc/my.cnf

Once file opened, locate line that read as follows

[mysqld]

Make sure line skip-networking is commented (or remove line) and add following line

Code:
[B]bind-address=YOUR-SERVER-IP[/B]

For example, if your MySQL server IP is 65.55.55.2 then entire block should be look like as follows:

[code]
[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/English
[B]bind-address    = 65.55.55.2[/B]
[B]# skip-networking[/B]

Where,

bind-address : IP address to bind to.
skip-networking : Don’t listen for TCP/IP connections at all. All interaction with mysqld must be made via Unix sockets. This option is highly recommended for systems where only local requests are allowed. Since you need to allow remote connection this line should be removed from my.cnf or put it in comment state.

Save and Close the file

If you are using Debian / Ubuntu Linux, type the following command to restart the mysql server:

Code:
/etc/init.d/mysql restart
 
Thank you so much for your answers!

Now port 3306 is open, but I would like open it for a specific remote address.

The procedure is that I go to Firewall settings, I click MySql and I choose "Allow from selected sources, deny from others" and I insert the IP that I want to allow connect with MySql?


Thank you again for your time and your answers!
 
Back
Top