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

Throwing "Commands out of sync; you can't run this command now" when executing multiple grant statement in MySQL 5.7 #124

Open
ghost opened this issue Feb 23, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 23, 2017

import MySQLdb as db
cnn = db.connect()
cur = cnn.cursor()
SQL = """
grant select on *.* to test@'localhost' identified by '';
grant select on *.* to test2@'localhost' identified by '';
"""
cur.execute(SQL)
@ghost ghost changed the title Throwing "Commands out of sync; you can't run this command now" when executing multiple statement in MySQL 5.7 Throwing "Commands out of sync; you can't run this command now" when executing multiple grant statement in MySQL 5.7 Feb 23, 2017
@UserName011
Copy link

You have this problem apparently because both statements are executing simultaneously.
https://dev.mysql.com/doc/refman/5.7/en/commands-out-of-sync.html

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

No branches or pull requests

1 participant