MySQL Grant

April 11th, 2009 by usage | Filed under Databases, MySQL

Create a user with limited permissions

GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, CREATE ROUTINE, ALTER ROUTINE,CREATE TEMPORARY TABLES,DROP,INDEX, LOCK TABLES  ON yourdb.* TO usr@localhost IDENTIFIED BY "pwd"

if you want to create a user that has access to databases that start with a certain prefix.

GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, CREATE ROUTINE, ALTER ROUTINE,CREATE TEMPORARY TABLES,DROP,INDEX, LOCK TABLES ON `clients_abc_%`.* TO client_user123@localhost IDENTIFIED BY "lalala"

tag_iconTags: |

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a comment.

To leave a comment, please fill in the fields below.