mysql revoke privileges

Just to take this note that to revoke a privilege in MySQL, you need to execute the command below,


mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'dealme'@'192.168.1.1';

mysql> flush privileges;



and specifying the HOST/IP address would allow the user to be validated and verified by its IP allowing to connect into the host, i.e. remote logged in which can be done by the grant command below.

mysql> GRANT ALL ON *.* TO 'dealme'@'192.168.1.1' IDENTIFIED BY 'dealmepassword'


and the command above will allow the user to connect to all database and with all privileges granted. This can be seen by querying into the database.

mysql> use mysql
mysql> select * from user where User='dealme' \G

\G would view the result vertically.

Comments

Popular posts from this blog

Using Oracle 11g thru VirtualBox appliance in Mac OS X Lion

Use Shell Editor for Eclipse for editing bash, ksh, csh in Unix/Linux system

LVM: How to remove a volume using pvremove