Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql user creation fails, if user already exists #2

Closed
dbosen opened this issue Mar 16, 2017 · 1 comment
Closed

Mysql user creation fails, if user already exists #2

dbosen opened this issue Mar 16, 2017 · 1 comment
Assignees

Comments

@dbosen
Copy link
Member

dbosen commented Mar 16, 2017

The script tries to create a new user for the database clone, this fails if the user already exists. You can modifiy the create user statement to use "CREATE USER IF NOT EXISTS"

@mtodor
Copy link
Contributor

mtodor commented Mar 17, 2017

Unfortunately "IF NOT EXISTS" option of "CREATE USER" statement is introduced in MySQL 5.7. So I provided solution with checking if user exists with SELECT statement before executing "CREATE USER".

Solution is provided in #4 pull request.

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

No branches or pull requests

2 participants