HeidiSQL 6.0.0.3914
add grants for db information_schema
show grants for test;
GRANT SELECT ON `information\_schema`.* TO 'test'@'%'
User manager add grants bug
We add the grants through the user manager for db 'test_test'
show grants for test;
GRANT SELECT ON `test\_test`.* TO 'test'@'%'
query: GRANT SELECT ON `test_test`.* TO 'test'@'%'
show grants for test;
GRANT SELECT ON `test\_test`.* TO 'test'@'%'
GRANT SELECT ON `test_test`.* TO 'test'@'%'
For what to use backslash?
show grants for test;
GRANT SELECT ON `test\_test`.* TO 'test'@'%'
query: GRANT SELECT ON `test_test`.* TO 'test'@'%'
show grants for test;
GRANT SELECT ON `test\_test`.* TO 'test'@'%'
GRANT SELECT ON `test_test`.* TO 'test'@'%'
For what to use backslash?
The backslash is important!
Without that backslash...
... the user cannot only access the "test_test" database, but also "testAtest", or "testotest". The underscore is a wildcard for exactly one character. If you escape that underscore with a backslash (like HeidiSQL does it), you just give the privilege to exactly the wanted database.
Now, to make it a bit more complicated: The dialog for selecting a database, table or column contains a text box at the bottom. If the user now really needs to access all databases beginning with "test_", HeidiSQL allows you to do that in this text box, without escaped wildcards.
Without that backslash...
GRANT SELECT ON `test_test`.* TO 'test'@'%'
... the user cannot only access the "test_test" database, but also "testAtest", or "testotest". The underscore is a wildcard for exactly one character. If you escape that underscore with a backslash (like HeidiSQL does it), you just give the privilege to exactly the wanted database.
Now, to make it a bit more complicated: The dialog for selecting a database, table or column contains a text box at the bottom. If the user now really needs to access all databases beginning with "test_", HeidiSQL allows you to do that in this text box, without escaped wildcards.
Please login to leave a reply, or register at first.