mysql wildcard permissions

Monday, 10. 24. 2005  –  Category: all, vague

I just can’t get wildcard permissions to work with MySQL – I want user ti to be able to do anything he likes to any database matching /^ti_/. The test databases are configure out of box like this, but I can’t seem to do this with GRANT:

mysql> grant all on "ti_%".* to ti@ti.jail.lemonia.org ; 
ERROR 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 '"ti_%".* to ti@ti.jail.lemonia.org' at line 1

mysql> grant all on "ti\_%".* to ti@ti.jail.lemonia.org ;
ERROR 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 '"ti\_%".* to ti@ti.jail.lemonia.org' at line 1

mysql> grant all on 'ti\_%'.* to ti@ti.jail.lemonia.org ; 
ERROR 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 ''ti\_%'.* to ti@ti.jail.lemonia.org' at line 1

Flail!

Leave a Reply