Categories
MySQL

Create New User in MySQL

Step 1: Create User

mysql > CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

Step 2: Grant Privileges

mysql > GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

Step 3: Flush Privileges

mysql > FLUSH PRIVILEGES;

If you are having trouble accessing your mysql shell through your command prompt, you will have to add it to your PATH environment variable.

Leave a Reply

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