更多内容
相关sql
create user 'fungli'@'%' identified by '123456';
delete from mysql.user where User = 'fungli' and Host = '127.0.0.1'
-- 创建账户并授权给指定租户
grant select privileges on `mycommunity_config_local`.* to 'fungli'@'%' identified by '123456';
grant select on `mycommunity_config_local`.* to 'fungli'@'%';
flush privileges;
revoke select on `mycommunity_config_local`.* from 'fungli'@'%';
flush privileges;
select * from information_schema.USER_PRIVILEGES where GRANTEE like '%fungli%'
权限说明
| 权限 | 说明 |
|---|
| all | |
| alter | |
| alter routine | 使用alter procedure 和drop procedure |
| create | |
| create routine | 使用create procedure |
| create temporary tables | 使用create temporary table |
| create user | |
| create view | |
| delete | |
| drop | |
| execute | 使用call和存储过程 |
| file | 使用select into outfile 和load data infile |
| grant option | 可以使用grant和revoke |
| index | 可以使用create index 和drop index |
| insert | |
| lock tables | 锁表 |
| process | 使用show full processlist |
| reload | 使用flush |
| replication client | 服务器位置访问 |
| replocation slave | 由复制从属使用 |
| select | |
| show databases | |
| show view | |
| shutdown | 使用mysqladmin shutdown 来关闭mysql |
| super | |
| update | |
| usage | 无访问权限 |