• 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.

Resolved Plesk backup can not Dump databases MariaDB 10.6.7

LTUser

Regular Pleskian
Ubuntu 18.04 LTS
MariaDB 10.6.7
Plesk 18.0.42


Backup Error:

"Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: WARNING: Forcing protocol to TCP due to option specification. Please explicitly state intended protocol. mysqldump: Got error: 1130: "Host '127.0.0.1' is not allowed to connect to this MariaDB server" when trying to connect"

If "skip_name_resolve" is set in mariadb.cnf

In /var/log/mysql/error.log:
"[Warning] Access denied for user 'admin'@'127.0.0.1' (using password: YES)"

So should i have 2 accounts for User "admin"? One for "localhost" and one for "127.0.0.1"?
 
So with this bind-adress = :: the same error occurs if "skip_name_resolve" is activated

BackupWarning:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: WARNING: Forcing protocol to TCP due to option specification. Please explicitly state intended protocol. mysqldump: Got error: 2002: "Can't connect to server on 'localhost' (115)" when trying to connect

So i have to stop "skip_name_resolve". :(
That must be an bug/error in plesk and "state intended protocol"
 
Not a bug, very simple MariaDB user permissions management. If you want to run it with AND without skip_name_resolve, you need to duplicate the "admin" user dataset and provide both, IP address in one and localhost name in the other permissions dataset. I would not do that, though, it creates unnecessary confusion.
 
very simple MariaDB user permissions management.
This has only been the case since MariaDB 10.6.x, before that, i.e. with MariaDB 10.5.x, I never had such problems with the Plesk backup and MariaDB.

Of course I won't create new users, you're right.
Then I'd better just leave NameResolve enabled in MariaDB.
 
The reason is that since MariaDB version 10.6.x, the "bind-address" directive in the my.cnf file expects the different syntax for localhost or wildcard binding. The previously allowed syntax "bind-address = ::ffff:127.0.0.1" is not allowed any longer. This is not a Plesk problem, but by design by MariaDB.
 
I got this error message with the plesk migrator:

"stderr: WARNING: Forcing protocol to TCP due to option specification. Please explicitly state intended protocol.
mysqldump: Got error: 1045: "Access denied for user 'admin'@'127.0.0.1' (using password: YES)" when trying to connect"

had tried with bind-address = :: without success.


# Broken reverse DNS slows down connections considerably and name resolve is
# safe to skip if there are no "host by domain name" access grants
#skip-name-resolve

last configuration is that.

why it doesn't work source and destination server are mariadb 10.6.8

i've never seen this error message before.
 
it's true you need both mariadb / mysql admin user in plesk.

admin@localhost

AND

[email protected]

got the plesk migration one step forward. this problem is solved.

Only one admin mysql user exists per default.
 
Not a bug, very simple MariaDB user permissions management. If you want to run it with AND without skip_name_resolve, you need to duplicate the "admin" user dataset and provide both, IP address in one and localhost name in the other permissions dataset. I would not do that, though, it creates unnecessary confusion.
Very useful reply, however the case is that everything works with plesk, wp and every app with skip_name_resolve=1 excep tthe backup and migration, is not it strange? @Peter Debik
 
I'm running into the same error after setting up a new server and migrating from an old one.
MariaDB 10.6.12

After backup the backup log has one entry for every domain with an active MySQL database:

Code:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
mysqldump: Got error: 2002: "Can't connect to server on 'localhost' (115)" when trying to connect

I have already made the following changes:

bind-address = ::
skip-name-resolve = 0

And I already added a second admin User with the hostname 127.0.0.1, so there is an admin User for every one of these hostnames:
127.0.0.1
localhost

I restarted mysql and the backup process several times, but I still get those messages. Everything else is running smoothly, so there has to be a problem with how backup is getting those dumps.
 
@KCTT, please check your /etc/my.cnf file again. There is a separate section for [mysqldump], probably there are other settings in there or settings missing.
 
I'm running into the same error after setting up a new server and migrating from an old one.
MariaDB 10.6.12

After backup the backup log has one entry for every domain with an active MySQL database:

Code:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
mysqldump: Got error: 2002: "Can't connect to server on 'localhost' (115)" when trying to connect

I have already made the following changes:

bind-address = ::
skip-name-resolve = 0

And I already added a second admin User with the hostname 127.0.0.1, so there is an admin User for every one of these hostnames:
127.0.0.1
localhost

I restarted mysql and the backup process several times, but I still get those messages. Everything else is running smoothly, so there has to be a problem with how backup is getting those dumps.
bind address = 127.0.0.1
 
You can simply add one.
I know but what would be the reason for it
10.6 mariadb comparing to 10.5 has the diference that skip name resolve should be disabled and bind address to be :: or 127.0.0.01 (in case where there is no 2nd admin @127.0.0.1 is created).
Skip name resolve diasb;ed is a performance case but can not have it all :)
 
Thanks to you both. But I still could not resolve the problem. Setting something like that

Code:
[mysqldump]
skip-name-resolve = 0

or

Code:
[mysqldump]
bind-address = 127.0.0.1
skip-name-resolve = 0

or

Code:
[mysqldump]
bind-address = ::
skip-name-resolve = 0

in e.g. /etc/mysql/mariadb.conf.d/50-mysql-clients.cnf gives me errors like this:

Code:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 7: mysqldump: unknown variable 'skip-name-resolve=0'
Code:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 7: mysqldump: unknown variable 'bind-address=0'
 
Back
Top