I'm running Craft 3 on a local windows machine, but every time I try to update certain plugins (or Craft itself) I get a message "Couldn't back up the database. How would you like to proceed".
The logs give the following:
[error][craft\controllers\UpdaterController::actionBackup] Error backing up the database: The shell command "mysqldump ..." failed with exit code 1.
(I've removed most of the error code for the actual query, let me know if that would be useful).
I'm aware there are well documented hurdles with mysqldump and localhost, but I've already tried the proposed solutions here, here and here.
The global (not local, though I've tried both) PATH env has been set with the root of my MySQL folder ("C:\wamp64\bin\mysql\mysql5.7.26\bin") and I've restarted my machine, server etc. but still get the same error. I've also confirmed mysqldump is running and available in a normal terminal.
I've also tried the official guide to get MAMP working, tweaked as best I could for Windows (though I'm far from experienced so could have done something wrong) and that did nothing either.
I'm running Windows 10 (if that helps).
Any idea what exit code 1 means?
EDIT: See the comments below, but I've almost cracked this. My remaining issue is that I can't find any examples of the my.cnf file. Doesn't seem to be present on any Craft installs I have access to (though only this one has this issue), which means I can't manually generate it and Craft seems to be failing to do so. Any ideas?
max_allowed_packet
in your MySQL Config and see if that helps. – Oli Jun 20 '19 at 12:33mysqldump
to connect to the same database and make a backup from the command line? – Brad Bell Jun 20 '19 at 20:58mysqldump --databases t_craft --single-transaction --set-gtid-purged=OFF --add-drop-database --triggers --routines --events --user=root --password > partial_database_backup.sql
However, having just tried using the script from the error log, I get an error due to the inclusion of the "&&" symbol, which is stated to be "not a valid statement seperator in this version". Interesting, will dig into this, but if anyone has any ideas how to change that it would be much appreciated! – theAdhocracy Jun 21 '19 at 8:03