Your cart is currently empty!
MySQL: Permissions
Create a user:
CREATE USER [email protected] IDENTIFIED BY 'password';
Rename a user:
RENAME USER [email protected] TO test@'%';
Grant all:
GRANT ALL PRIVILEGES ON <database>.<table> TO <user>@<host>;
Grant all to a database starts with “test_”:
GRANT ALL PRIVILEGES ON `test\_%`.* TO test@localhost;
From MySQL website:
The
_and%wildcards are permitted when specifying database names inGRANTstatements that grant privileges at the database level (GRANT ... ON). This means, for example, that to use adb_name.*_character as part of a database name, specify it using the\escape character as\_in theGRANTstatement, to prevent the user from being able to access additional databases matching the wildcard pattern (for example,GRANT ... ON `foo\_bar`.* TO ...).
REFERENCES:

Leave a Reply