Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

bootstrap: MySQL restore fails with "access denied" #3394

Closed
lmars opened this issue Sep 15, 2016 · 1 comment
Closed

bootstrap: MySQL restore fails with "access denied" #3394

lmars opened this issue Sep 15, 2016 · 1 comment

Comments

@lmars
Copy link
Contributor

lmars commented Sep 15, 2016

When running the BackupSuite tests with a backup containing a MySQL dump, running mysql console fails:

++ 15:57:25.175 checking mysql resource
++ 15:57:25.175 /home/ubuntu/go/src/github.com/flynn/flynn/cli/bin/flynn mysql console -- -e SELECT * FROM foos
ERROR 1045 (28000): Access denied for user '0dba71ca1b751a3a96f2da7c4f492c16'@'100.101.100.22' (using password: YES)

This can be reproduced by bootstrapping from a MySQL cluster I uploaded to S3 and trying to get a console:

$ script/bootstrap-flynn --from-backup https://s3.amazonaws.com/flynn-test/backups/cluster/v20160814.0-nodejs-mysql.tar

$ flynn -a nodejs mysql console
ERROR 1045 (28000): Access denied for user '0dba71ca1b751a3a96f2da7c4f492c16'@'100.100.88.22' (using password: YES)

/cc @josephglanville

josephglanville added a commit that referenced this issue Sep 16, 2016
This emits a `FLUSH PRIVILEGES` command at the end of the dump to ensure
information restored from the `mysql` database is made active.

Closes #3394

Signed-off-by: Joseph Glanville <jpg@jpg.id.au>
@josephglanville
Copy link
Contributor

If you restore a backup prior to this change you can fix the access errors by running the following after the restore has completed:

flynn -a mariadb mysql console -- -e 'FLUSH PRIVILEGES'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants