Select Page

To Create a new user in mysql
CREATE USER ‘UserName’@’localhost’ IDENTIFIED BY ‘Password’;

To Grant user access to the Database
GRANT ALL PRIVILEGES ON DatabaseName . * TO ‘UserName’@’localhost’;

After that Flush the privileges so the changes will take affect.
FLUSH PRIVILEGES;