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

cli: Fix importing mysql databases #2818

Merged
merged 1 commit into from
May 13, 2016
Merged

cli: Fix importing mysql databases #2818

merged 1 commit into from
May 13, 2016

Conversation

lmars
Copy link
Contributor

@lmars lmars commented May 11, 2016

The mysqldump --databases flag leads to both CREATE DATABASE and USE statements to be included in the dump. We are setting the --no-create-db to avoid including the CREATE DATABASE statement (the new app will already have a database), but the USE statement remained leading to the following error on import:

ERROR 1044 (42000) at line 22: Access denied for user '04f365e0e25e2c63668876c771ff8cf1'@'%' to database 'dcc6f9d2b76880dde63f975c3637df7f'

Given we only export one database, and we use the -D flag on import to use a specific database, there seems to be no reason to use the --databases flag.

/cc @josephglanville

The mysqldump --databases flag leads to both CREATE DATABASE and USE
statements to be included in the dump. We are setting the --no-create-db
to avoid including the CREATE DATABASE statement (the new app will
already have a database), but the USE statement remained leading to the
following error on import:

```
ERROR 1044 (42000) at line 22: Access denied for user
'04f365e0e25e2c63668876c771ff8cf1'@'%' to database
'dcc6f9d2b76880dde63f975c3637df7f'
```

Given we only export one database, and we use the -D flag on import to
use a specific database, there seems to be no reason to use the
--databases flag.

Signed-off-by: Lewis Marshall <lewis@lmars.net>
@josephglanville
Copy link
Contributor

LGTM

@lmars lmars merged commit 9fd6339 into master May 13, 2016
@lmars lmars deleted the fix-mysql-import branch May 13, 2016 00:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants