Create a MySQL User

suggest change

For creating new user, We need to follow simple steps as below :

Step 1: Login to MySQL as root

$ mysql -u root -p

Step 2 : We will see mysql command prompt

mysql> CREATE USER 'my_new_user'@'localhost' IDENTIFIED BY 'test_password';

Here, We have successfully created new user, But this user won’t have any permissions, So to assign permissions to user use following command :

mysql> GRANT ALL PRIVILEGES ON my_db.* TO 'my_new_user'@'localhost' identified by 'my_password';

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents