Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Add a user to Mysql via shell – CentOS 6.5

Start off by adding a new user to Mysql

CREATE USER 'test123'@'localhost' IDENTIFIED BY 'testpassword123';

You should see a Query OK message from Mysql signalling that it run without error.

Now grant privileges to that user on a database

GRANT ALL PRIVILEGES ON testDatabase.* TO 'testuser'@'localhost'

Now reload privileges with