1

I'm getting an error message when trying to back up the Craft DB.

2019-09-04 10:21:09 [-][1][6eba342acf082a62ea47300d68faddf4][error][yii\base\Exception] yii\base\Exception: Could not create backup: The shell command "mysqldump --defaults-extra-file="/var/www/html/storage/runtime/temp/my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --set-charset --triggers --single-transaction --no-data --result-file="/var/www/html/storage/backups/client-name_190904_172109_fnrhjpwxac_v3.2.10.sql" craft && mysqldump --defaults-extra-file="/var/www/html/storage/runtime/temp/my.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --set-charset --triggers --no-create-info --ignore-table=craft.assetindexdata --ignore-table=craft.assettransformindex --ignore-table=craft.sessions --ignore-table=craft.templatecaches --ignore-table=craft.templatecachequeries --ignore-table=craft.templatecacheelements --ignore-table=craft.cache --ignore-table=craft.templatecachecriteria craft >> "/var/www/html/storage/backups/client-name_190904_172109_fnrhjpwxac_v3.2.10.sql"" failed with exit code 127: sh: 1: mysqldump: not found in /var/www/html/vendor/craftcms/cms/src/controllers/UtilitiesController.php:343

I'm not sure where to look to solve this. How may I get the DB to back up?

2

Your server seems to be missing the shell command mysqldump, contact your IT-Specialist and tell him you need that to be installed you can backup your website.

Or if you plan on installing it yourself, this should do the trick.

Excerpt from there:

sudo apt-get install mysql-client-5.7

If it's not able to find the package, try entering the statement till the mysql part and then hold tab it should then show you all available versions which you can install.

  • Or it could be installed, but it's not available to PHP. The easiest way to do that is with through the PATH environment variable. – Brad Bell Sep 7 at 0:05
  • Indeed, I forgot about that, thanks for the reminder. use phpinfo(); die; to view just about all settings in your PHP-installation including your PATH environment variable (as far as I know). – Campiotti Sep 10 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.