Home / Technology / IT / Tutorials / Adding privileges to a user in mysql 5.7 using terminal

Adding privileges to a user in mysql 5.7 using terminal

First of all we know that we cannot use the root account any more in this version, So we well grant all privileges to a new user we create now to manage databases. Let’s start.

Open your terminal #

mysql -u root

Next Assume we have a user called ubuntu, now we well

grant all on *.* to 'ubuntu'@'localhost' with grant option;

Then we make flush for privilegs

flush privilegs;

Lets see the changes on ubuntu using the below command:

show grants for 'ubuntu'@'localhost';

Finally Exit mysql:

Another view from phpmyadmin with a test db “asdasd”

About Kalaweeza

Check Also

How to use root account to manage mysql databases

After installing mysql, you need to create an account to manage your databases as descried …

Leave a Reply

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

Powered by keepvid themefull earn money