Mysql modify and revoke permissions bitsCN.com
Mysql modify/revoke permissions
For the sake of security, mysql can only log on locally by default. the remote logon permission is disabled. if you need to log on remotely, perform the following configuration:
(1) log on to mysql: [The password can be blank, but this is not safe]
1
Mysql> grant all privileges on dbname. tbname to 'username' @ 'login IP' identified by 'password' with grant option;
2
Dbname = * indicates all databases
3
Tbname = * indicates all tables
4
Login ip = % indicates any ip address
5
Password is blank, indicating that you can log on without a password
(2) update:
1
Mysql> flush privileges
(3) users can log on remotely and only perform specific operations:
1
Mysql> grant select, insert, update, delete on *. * to 'root' @ 'IP' identified by "password ";
(4) revoke permissions:
01
Mysql> revoke privileges on dbname [. tbname] from username;
02
Privileges includes:
03
Alter: modify the database table
04
Create: create a new database or table
05
Delete: delete table data
06
Drop: delete database/table
07
Index: Create/delete an index
08
Insert: Add table data
09
Select: query table data
10
Update: update table data.
11
All: allow any operation
12
Usage: only logon allowed
BitsCN.com