Creating a New user with permissions for MySQL

As it says on the tin

Create the user

mysql> create user mysqlusergoeshere@localhost identified by 'somepasswordcangoheremakeitsecure';
Query OK, 0 rows affected (0.03 sec)

Create the Permissions for the user

mysql> GRANT ALL PRIVILEGES ON database_name.* to mysqlusergoeshere@localhost;
Query OK, 0 rows affected (0.01 sec)

Simples.

One thought on “Creating a New user with permissions for MySQL

  1. This can also be put in the one command:

    GRANT ALL PRIVILEGES ON database_name.* to mysqlusergoeshere@localhost identified by 'somepasswordcangoheremakeitsecure' ;

Leave a Reply

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