• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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