-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: provide a command line flag --skip-grant-table #2897
Conversation
dropDBSQL := fmt.Sprintf("drop database %s;", dbName) | ||
|
||
save1 := privileges.Enable | ||
save2 := privileges.SkipWithGrant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer privileges.Enable = save1, privileges.Enable = save1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defer can't apply to a expression, it need to use a function.
here is a really simple case, defer seems overkill.
MySQL only allow root user to skip authentication. |
I checked that the user have root privilege. @shenli |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This flag is useful when user forget root password.
A powerful and dangerous flag.