Friday, March 26, 2010

MySQL Users

not just me i'm sure but creating users on MySQL seems a bit onerous.

Anyway, to create a user (X) and give access to a d/b (D):


create user 'X'@'localhost' identified by 'password';
create user 'X'@'%' identified by 'password';

grant all privileges on D.* to 'X'@'localhost';
grant all privileges on D.* to 'X'@'%';


Here endeth the lesson.

No comments: