Unsupported mysqldump args cause scripts to fail with MariaDB
michaelroper opened this issue · comments
Apparently MariaDB does not recognise the --set-gtid-purged=OFF
arg that was added in the last update, so pull_db.sh
may fail if the DB in use is MariaDB.
$ ./scripts/pull_db.sh
mysqldump: unknown variable 'set-gtid-purged=OFF'
mysqldump: unknown variable 'set-gtid-purged=OFF'
site-db-dump-20210206.sql.gz 100% 58 0.9KB/s 00:00
mysqldump: unknown variable 'set-gtid-purged=OFF'
Found a similar issue on the Laravel repo which probably describes it better.
If I comment out that line, it seems to work fine for me again, though my remote is a MariaDB instance on Amazon RDS. Not sure if there's a way around it that also works for those permissions issues you were trying to solve?
hmmm. Probably the way to solve it would be to move an additional params to the .env.sh
file or such.
We are running into this issue with MariaDB on our production servers as well. Realized that DB backups were just empty files. Going to the previous commit d8ccc74 fixes the problem.
Fixed in 1.2.13 https://github.com/nystudio107/craft-scripts/releases/tag/1.2.13