Posted By

manuelstofer on 03/17/10


Tagged

mysql sql create user


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


SQL: Create a user that has only access to one database


 / Published in: SQL
 

creates a user that has only access to one database, from any host

  1. CREATE USER 'username'@'%' IDENTIFIED BY 'password';
  2. GRANT ALL PRIVILEGES ON `database` . * TO 'username'@'%';
  3. FLUSH PRIVILEGES;

Report this snippet  

You need to login to post a comment.