Add new user to MySQL database. First, log into the MySQL console, and then run the following command, replacing databasename, username and password.

mysql> GRANT ALL ON databasename.* TO username@localhost IDENTIFIED BY 'password';