Grant users access to mysql with a dash in the database name
- by Matt
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;