Grant permissions to a set of databases matching a pattern in MysQL 5.0

Posted by Xian on Stack Overflow See other posts from Stack Overflow or by Xian
Published on 2010-03-18T10:45:30Z Indexed on 2010/03/30 16:33 UTC
Read the original article Hit count: 591

Filed under:
|
|
|

I'm lead to understand that the following grants all proveleges to all databases that name begin with 'xian_', but mysql complains about a syntax error near ''xian_...

GRANT ALL PRIVILEGES ON 'xian_%.*' TO xian@'192.168.1.%';

What is the correct syntax? Am I right in thinking that the _ needs escaping to \_ too as it is also a wildcard?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query