• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Plesk Backup Error: Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 127: sh: 1: mysqldump: not found

quattro123

Basic Pleskian
Server operating system version
Debian 11
Plesk version and microupdate number
18.0.43
Suddenly when creating Backups of my Database, I am getting this error for all databases:
Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 127: sh: 1: mysqldump: not found

Does anyone know what is going on here?


Greetings
 
When I try to fix it with "plesk repair installation -v"

I am getting this output:

plesk repair installation -v

Reconfiguring the Plesk installation


**** Product repair started.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

Trying to start service mariadb... done
Trying to establish test connection... connected
done
Trying to find psa database... version is 018000000
Trying to backup MySQL database... /opt/psa/bootstrapper/pp18.0.43-bootstrapper/bootstrapper.sh: line 5254: /usr/bin/mysqldump: Is a directory

ERROR while trying to backup MySQL database

Check the error reason (see log file: /var/log/plesk/install/plesk_18.0.43_repair.log), fix and try again

**** Product repair failed.

/opt/psa/bootstrapper/pp18.0.43-bootstrapper/bootstrapper.sh: line 5254: /usr/bin/mysqldump: Is a directory
***** problem report *****
ERROR while trying to backup MySQL database

exit status 1

plesk_18.0.43_repair.log says this:

**** Product repair failed.

/opt/psa/bootstrapper/pp18.0.43-bootstrapper/bootstrapper.sh: line 5254: /usr/bin/mysqldump: Is a directory
***** problem report *****
ERROR while trying to backup MySQL database
STOP Bootstrapper 18.0.43 repair AT Sat May 28 07:37:11 CEST 2022
START Bootstrapper 18.0.43 repair AT Sat May 28 07:37:16 CEST 2022

**** Product repair started.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

Trying to start service mariadb... active
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 018000000
Trying to backup MySQL database... /opt/psa/bootstrapper/pp18.0.43-bootstrapper/bootstrapper.sh: line 5254: /usr/bin/mysqldump: Is a directory

ERROR while trying to backup MySQL database


**** Product repair failed.

/opt/psa/bootstrapper/pp18.0.43-bootstrapper/bootstrapper.sh: line 5254: /usr/bin/mysqldump: Is a directory
***** problem report *****
ERROR while trying to backup MySQL database
STOP Bootstrapper 18.0.43 repair AT Sat May 28 07:37:16 CEST 2022

Not getting so much out of this log message
 
Can you show the output of these commands please?
Code:
# cat /etc/psa/psa.conf | grep MYSQL_BIN_D
# ls -l /usr/bin/mysqldump
 
mysqldump is a part of mariadb-client package. Make sure that it is installed on your server. On my test Plesk server on Debian 11 I see:

root@modest-snyder:~# plesk version
Product version: Plesk Obsidian 18.0.43.1
OS version: Debian 11.3 x86_64
Build date: 2022/04/14 18:00
Revision: 1a6b26fb2fd0ac923f3ca10bdfd13b721cb5c676

root@modest-snyder:~# ls -la /usr/bin/mysqldump
lrwxrwxrwx 1 root root 12 Feb 20 01:40 /usr/bin/mysqldump -> mariadb-dump

root@modest-snyder:~# dpkg -S /usr/bin/mysqldump
mariadb-client-10.5: /usr/bin/mysqldump
 
Code:
root@server:~# which mysqldump
root@server:~# apt list --installed | grep -i mysql

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

mysql-common/stable,stable,now 5.8+1.0.7 all [installed,upgradable to: 1:10.6.8+                maria~bullseye]
mysqltuner/stable,stable,now 1.7.17-1 all [installed]
plesk-mysql-server/now 18.0.1-v.debian.11+p18.0.43.0+t220331.2159 all [installed                ,local]
plesk-php74-mysql/bullseye,now 7.4.29-debian.11.220415.1034 amd64 [installed]
plesk-php80-mysql/bullseye,now 8.0.19-debian.11.220513.0910 amd64 [installed]
plesk-php81-mysql/bullseye,now 8.1.6-debian.11.220513.0910 amd64 [installed]
root@server:~#
 
Code:
root@server:~# plesk version
Product version: Plesk Obsidian 18.0.43.1
     OS version: Debian 11.3 x86_64
     Build date: 2022/04/14 18:00
       Revision: 1a6b26fb2fd0ac923f3ca10bdfd13b721cb5c676

root@server:~# ls -la /usr/bin/mysqldump
total 44
drwxr-xr-x 2 root root  4096 May 28 07:34 .
drwxr-xr-x 3 root root 36864 May 28 07:34 ..

root@server:~# dpkg -S /usr/bin/mysqldump
dpkg-query: no path found matching pattern /usr/bin/mysqldump
 
Try to install missing mariadb-client package with

# apt install mariadb-client
 
I am getting this output

Code:
root@server:~# apt install mariadb-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mariadb-client : Depends: mariadb-client-10.6 (>= 1:10.6.8+maria~bullseye) but it is not going to be installed
 mariadb-server : Depends: mariadb-server-10.6 (>= 1:10.6.8+maria~bullseye) but 1:10.6.7+maria~bullseye is to be installed
 mariadb-server-10.6 : Depends: mariadb-client-10.6 (>= 1:10.6.7+maria~bullseye) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
 
And when I am trying to run "apt --fix-broken install" afterwards, I am getting this:


Code:
root@server:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mariadb-client-10.6 mariadb-client-core-10.6 mariadb-server-10.6 mariadb-server-core-10.6
Suggested packages:
  mariadb-test netcat-openbsd
The following NEW packages will be installed:
  mariadb-client-10.6
The following packages will be upgraded:
  mariadb-client-core-10.6 mariadb-server-10.6 mariadb-server-core-10.6
3 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
2 not fully installed or removed.
Need to get 0 B/13.8 MB of archives.
After this operation, 51.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Setting up mariadb-common (1:10.6.8+maria~bullseye) ...
update-alternatives: error: alternative path /etc/mysql/mariadb.cnf doesn't exist
dpkg: error processing package mariadb-common (--configure):
 installed mariadb-common package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 mariadb-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
I'd suggest you contact Plesk Support Team. They will fix the issue directly on your server.
Obviously, there is packages/repos inconsistency that requires manual fixing on your server.
 
Back
Top