-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 command fail with dots in database names #3767
Comments
I'm also experiencing this, but with the following database name: "glasgow-locum-group_production" (minus quotes). I'm using mariaDB 5.5.32. I'm going to have a dig and see if I can cook up a pull request. |
…res) in database names.
@johnhamelink - I forgot to say: thank you for taking care of this! 👍 |
No problem @sevein! |
Could it be that this error is back again? _mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON . TO 'replication'@'localhost'' at line 1") With this ansible setup:
(This comment is removing the stars, please also see here: http://pastebin.com/iBWHZfZM ) ansible version: 1.6.2 |
@markmaas +1
in role task:
|
#7804 fixes this issue but the issue is closed without any commit merged into the core repo. |
As I use the domainname of a site as database name, ansible fails on these values.
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.nl.* TO 'www.mysite.nl'@'localhost'' at line 1")
MySQL server version: 5.5
I'm using the action:
mysql_user name=$mysql_user host=localhost password=$mysql_password state=present priv=$mysql_db.*:ALL
The grant statement needs to have the database name quoted:
grant all privileges on
www.mysite.nl.* to 'gtd.edoburu.nl'@localhost;
I've did some digging through the ansible source code, but couldn't really find how to change that.
The text was updated successfully, but these errors were encountered: