• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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