How create Mysql User, Database and set privileges to user
[saju@localhost ~]$ mysql or mysql -u root or mysql -u root -p
mysql> create user 'saju'@'localhost' identified by '123456';
mysql> create database if not exists `sajudb`;
mysql> grant all on sajudb.* to saju@localhost identified by "123456" with grant option;
[saju@localhost ~]$ mysql sajudb -u saju -p
mysql> show databases
mysql> use sajudb
No comments:
Post a Comment