parent
1a2884788f
commit
e459cea0f0
|
@ -125,7 +125,7 @@ CREATE USER 'm23100'@'%';
|
|||
# 如果要授予该用户对所有数据库和表的相应操作权限则可用 * 表示, 如 *.*
|
||||
GRANT privileges ON databasename.tablename TO 'username'@'host'
|
||||
# 示例
|
||||
GRANT ALL ON test.* TO username@'localhost' IDENTIFIED BY 'password';
|
||||
GRANT ALL ON test.* TO 'username'@'localhost' IDENTIFIED BY 'password';
|
||||
|
||||
# 撤销用户权限
|
||||
REVOKE privilege ON databasename.tablename FROM 'username'@'host';
|
||||
|
@ -151,7 +151,7 @@ UPDATE mysql.user set plugin='mysql_native_password';
|
|||
UPDATE mysql.user set password=PASSWORD("newpassword") where User='root';
|
||||
# 刷新权限信息
|
||||
FLUSH privileges;
|
||||
exit
|
||||
exit;
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
Loading…
Reference in New Issue