Log on as root.
$ mysql -u root -p
Enter password:
If you need to create a database for the user, do so:
mysql> CREATE DATABASE newuserdb;
Query OK, 1 ROW affected (0.00 sec)
Allow the new user to connect from localhost:
mysql> GRANT usage ON *.* TO <a href="mailto:newuser@localhost">newuser@localhost</a> IDENTIFIED BY 'passWord';
Query OK, 0 ROWS affected (0.00 sec)
Grant all privileges on the database to the new user:
mysql> GRANT ALL privileges ON newuserdb.* TO <a href="mailto:newuser@localhost">newuser@localhost</a> ;