When we do the fresh installation of Mysql we got the root user without any password. Keeping and using the root user for application is not safe.

mysql create user and grant all privileges on database

mysql create user and grant all privileges on database

mysql create user and grant all privileges on database

For creating new user use the following commands.

CREATE USER 'wordpressapi'@'localhost' IDENTIFIED BY 'Test@123456';
GRANT ALL ON *.* TO 'wordpressapi'@'localhost';

Written by Purab Kharat

My name is Purab Kharat, Here is my Personal Blog: wpapi.com. Work as an Senior Technical Lead at Smartsourcing Global Pvt Ltd in Princeton, NJ, USA. I contributor of many wordpress plugins and Drupal Modules. I am core developer of Drupal. Connect to on LinkedIn or Follow @purab on Twitter or Follow me on Google+ or Write Mail to purabdk@gmail.com or Chat with me on Skype : purabdk

Leave a Comment

Your email address will not be published. Required fields are marked *