Add new user to MySQL database

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

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

Add new comment