Create MySQL User and Grant all Privileges

From FiberWiki

Revision as of 21:57, 6 June 2009 by Adminwiki (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
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;
Navigation