Home / Technology / IT / Linux / Create a New User and Grant Permissions in MySQL

Create a New User and Grant Permissions in MySQL

To connect to any database with same account, open your connection to your server:

1- Log in to MySQL with the command

mysql -u root -p

2- Type the MySQL root user password.

3- Use the below MySQL command to create the user and do not forget to replace user with the username :

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

4- Give the user full access to all databases on server

GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';

5- Flush the privileges to see the effect.

FLUSH PRIVILEGES;

6- Now type exit to exit from mysql to your command line or terminal.

About Kalaweeza

Check Also

PHP GD library is NOT installed on your web server ubuntu – Linux mint19

GD module for PHP7 .1, .2 and .3 php7.2-gd php7.3-gd Above a deep dive to …

Leave a Reply

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

Powered by keepvid themefull earn money