Create a new mysql user and grant all privileges to them on a database

The following command will create a new user and grant them all the permissions on a database.

grant all privileges on database_name.* to 'username'@'localhost' identified by 'secure_password';

To list the permissions granted to a user

show grants for 'username'@'localhost';

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...

Leave a Reply

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