You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when triggering database backups via the CLI (Fortrabbit hosting). Using this as part of a CI process from Github Actions. Seems to be a problem with mysqldump.
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s)
Here are all the commands I run after local update and rsync.
Run php craft db/backup before or after an update on the production server via shell/ssh
Expected behavior
Backups should happen without error.
Actual behavior
Shell command errors out with the following message:
The shell command "mysqldump --defaults-file="/tmp/vjgznbtozfzv.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --single-transaction --no-data --result-file="/srv/app/iad/htdocs/storage/backups/*********--v4.4.5.sql" **** && mysqldump --defaults-file="/tmp/vjgznbtozfzv.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --single-transaction --no-create-info --ignore-table=***.assetindexdata --ignore-table=***.imagetransformindex --ignore-table=***.resourcepaths --ignore-table=***.sessions --ignore-table=***.cache iad >> "/srv/app/***/htdocs/storage/backups/*********--v4.4.5.sql"" failed with exit code 2: mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
Whether I run the command as part of the deployment pipeline or while connected to the box via SSH, I get the same error. I can, however, create a dump of the DB via Sequel Ace.
Is there anything I can do to get the situation back to normal ? This used to work flawlessly until now.
mysqldump version
Checked that mysqldump is installed. Here is what I get when running mysqldump --version on the production server.
mysqldump Ver 10.13 Distrib 5.7.41, for Linux (x86_64)
Craft CMS version
4.4.5
PHP version
8.1.17
Operating system and version
Linux 4.15.0-1146-aws
Database type and version
MySQL 5.7.38
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.1-3)
Installed plugins and versions
Feed Me 5.1.1.1
Redactor 3.0.4
The text was updated successfully, but these errors were encountered:
Right. It seems Fortrabbit updated their mysqldump version to 5.7.41 which has a bug. I had the (awesome) support staff over there and, apparently, the workaround in the Craft codebase doesn't correctly detect their affected mysqldump version.
@jeromecoupe thanks for that - I commented over on the PR, but the tl/dr is I don’t think checking the mysqldump version in our workaround would solve the underlying issue. Going to close this out, as I don’t think there's anything else we can do to work around it, but will keep following along for any feedback.
What happened?
Description
Error when triggering database backups via the CLI (Fortrabbit hosting). Using this as part of a CI process from Github Actions. Seems to be a problem with mysqldump.
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s)
Here are all the commands I run after local update and rsync.
Steps to reproduce
Run
php craft db/backup
before or after an update on the production server via shell/sshExpected behavior
Backups should happen without error.
Actual behavior
Shell command errors out with the following message:
Whether I run the command as part of the deployment pipeline or while connected to the box via SSH, I get the same error. I can, however, create a dump of the DB via Sequel Ace.
Is there anything I can do to get the situation back to normal ? This used to work flawlessly until now.
mysqldump version
Checked that mysqldump is installed. Here is what I get when running
mysqldump --version
on the production server.mysqldump Ver 10.13 Distrib 5.7.41, for Linux (x86_64)
Craft CMS version
4.4.5
PHP version
8.1.17
Operating system and version
Linux 4.15.0-1146-aws
Database type and version
MySQL 5.7.38
Image driver and version
Imagick 3.7.0 (ImageMagick 7.1.1-3)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: