How create Mysql User, Database and set privileges to user on linux?

How create Mysql User, Database and set privileges to user on linux?

How create Mysql User, Database and set privileges to user

[ravi@linuxforfreshers.com~]$ mysql –u
root –p

password:

mysql> create user ‘ravi’@’localhost’
identified by ‘123456’;

mysql> create database if not
exists `ravidb`;

mysql> grant all on ravidb.* to ravi@linuxforfreshers.com
identified by “123456” with grant option;

[ravi@linuxforfreshers.com~]$ mysql ravidb
-u ravi -p

mysql> show databases;

mysql> use ravidb;

Source

Leave a Reply

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

WP2Social Auto Publish Powered By : XYZScripts.com