Mysql Commands

> mysql -u root -p

mysql> show databases;

mysql> create database new_database;

mysql> select user, host from mysql.user;

mysql> create user 'newuser'@'localhost' identified by 'password';

mysql> drop user 'newuser'@'localhost';

mysql> grant all privileges on new_database.* to 'newuser'@'localhost';

mysql> revoke all privileges, grant option from 'newuser'@'localhost';

mysql> show grants for 'newuser'@'localhost';

If privilege change is not in effect, you need to reload the privileges:
mysql> flush privileges;

No comments:

Post a Comment