mysql create user and grant all privileges on database

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';

Add a Comment

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