User account can be created by using MySQL's GRANT statement. For this, you'll need to login to MySQL using the root account, which has full privilege on the mysql.user table.

The following statement will create a user account named myusername which will have full access to the mydatabase database from localhost and set the password to mypassword

 GRANT ALL ON mydatabase.* TO 'myusername'@'localhost' IDENTIFIED BY 'mypassword';
Discuss the article:

Share your thoughts, suggest corrections or just say Hi. Login not required.

Share!