• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Question Change default Mysql/Mariadb port - backup issue

JVG

Basic Pleskian
Server operating system version
Debian 12.5
Plesk version and microupdate number
18.0.61.5
Product version: Plesk Obsidian 18.0.61.5
OS version: Debian 12.5 x86_64
mariadb Ver 15.1 Distrib 10.11.6-MariaDB

Hi,

I needed remote access to a subscription database, I follow a couple of docs and everything worked fine.

Now I figured to change the default Mariadb port (my first time doing so), so I added to /etc/mysql/mariadb.conf.d/50-server.cnf under mysqld:
port = newport

I restarted the service, added such port to the firewall and again, everything worked fine and now I have remote access through that port.

The problem is that now I can't backup the database through Plesk. When I try to do so I get this error:
Code:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: mysqldump: Got error: 2002: "Can't connect to server on 'localhost' (111)" when trying to connect

Is there something in the Plesk configuration files that I need to change? or in some other mysql/mariadb file?

Also in the Tools & Settings > Database Servers section it still shows the port 3306 for MariaDb at localhost, even though I've tested to connect to the new port and it works.

Again, is my first time changing the default port on a Plesk server so any guidance would be appreciated.
 
Now I figured to change the default Mariadb port (my first time doing so), so I added to /etc/mysql/mariadb.conf.d/50-server.cnf under mysqld:
port = newport
Just for my own understanding, did you change the port of MariaDB on the remote database server? Or on the Plesk server?
 
Just for my own understanding, did you change the port of MariaDB on the remote database server? Or on the Plesk server?
Hi,

the Plesk server is where the database is, I needed access to it from my local machine.

I changed it on the plesk server by adding the new port to the /etc/mysql/mariadb.conf.d/50-server.cnf file under mysqld.

This worked because now I can access the database hosted at Plesk through that new port from my local enviroment.

But Plesk can't backup the database and it shows the error mentioned above.
 
Got it, thank you for clarifying.

I am not sure if Plesk supports running MariaDB on a different port. However I submitted a bug report about this, as all other aspects of Plesk seem to work fine. Unfortunately I don't have any suggestion how to solve the issue.

What you can try als a workaround is to exclude databases from the backups and create a bash script that uses the Plesk CLI to make seprate database dumps. An explanation on how to use the Plesk CLI to make database dumps can be found here: https://support.plesk.com/hc/en-us/...a-a-command-line-interface-in-Plesk-for-Linux
 
  • Like
Reactions: JVG
I just got confirmation for our engineers that running Plesk on a different port isn't (officially) supported.
 
  • Like
Reactions: JVG
Back
Top