Create MySQL User and Grant all Privileges

From FiberWiki

Jump to: navigation, search

Adding MySQL User with all Privieges

This is for MySQL version 5.0.45 which is from the default CentOS repos.

mysql -u root -p
(Enter Password)
create user 'USER'@'localhost' identified by 'PASSWORD';
grant all privileges on DATABASE.* to 'USER'@'localhost' with grant option;

If you want to give this user access to all databases, use the following:

grant all privileges on *.* to 'USER'@'localhost' with grant option;
Personal tools
Navigation