Thursday, September 6, 2012

How to add mysql user


To create a super user to local host

mysql> create user 'dunhill'@'localhost' identified by 'password';
mysql>grant all privileges on *.* to 'dunhill'@'localhost' with grant option;

To create a super user to any host

mysql> create user 'dunhill'@'%' identified by 'password';
mysql> grant all privileges on *.* to 'dunhill'@'%' with grant option;

To create a normal user with limited access

mysql> create user 'admin'@'localhost';
mysql> grant reload,process on *.* to 'admin'@'localhost';

No comments:

Post a Comment