Grant users access to mysql with a dash in the database name

Posted by Matt on Server Fault See other posts from Server Fault or by Matt
Published on 2010-05-07T01:27:52Z Indexed on 2010/05/07 1:38 UTC
Read the original article Hit count: 357

Filed under:

Unfortunately, I have a database name with a dash in it. How do I grant access to that database as mysql reports a syntax error.

e.g.

grant select,insert,update,delete on astpp.* to 'portal'@'localhost' identified by 'Ab7g12Xh35' with grant option;

works, but

grant select,insert,update,delete on astpp-eth01.* to 'portal'@'localhost' identified by 'Ab7g12Xh35' with grant option;

Does not.

Neither does: grant select,insert,update,delete on 'astpp-eth01'.* to 'portal'@'localhost' identified by 'Ab7g12Xh35' with grant option;

© Server Fault or respective owner

Related posts about mysql