MySQL数据库权限是指用户或用户组在数据库中执行特定操作的权限,这些权限可以分为以下几类:
1、全局权限
2、数据库权限
3、表权限
4、列权限
5、存储程序权限
6、函数权限
7、过程权限
8、事件权限
9、索引权限
下面分别对这些权限进行详细说明:
1、全局权限
全局权限控制用户对整个MySQL服务器的操作,主要包括以下几种:
权限名称 | 描述 |
ALL PRIVILEGES | 所有权限 |
ALTER ROUTINE | 修改存储过程、函数和触发器 |
ALTER USER | 修改其他用户的密码和主机名 |
CREATE ROUTINE | 创建存储过程、函数和触发器 |
CREATE TEMPORARY TABLES | 创建临时表 |
CREATE USER | 创建新用户 |
DELETE | 删除数据 |
DROP | 删除数据库、表等对象 |
EXECUTE | 执行存储过程、函数和触发器 |
FLUSH PRIVILEGES | 刷新权限 |
PROCESS | 查看服务器中其他用户的进程信息 |
RELOAD | 重新加载权限表,刷新日志等 |
REPLICATION CLIENT | 复制客户端连接 |
REPLICATION SLAVE | 复制从服务器连接 |
SHOW DATABASES | 查看所有数据库 |
SHOW GRANTS | 查看用户的权限 |
SHOW VARIABLES | 查看系统变量的值 |
SHUTDOWN | 关闭MySQL服务器 |
UPDATE | 更新数据 |
USAGE | 查看服务器的使用情况 |
GRANT OPTION | 授予其他用户或用户组授予权限的能力 |
HELP | 显示帮助信息 |
KILL | 根据进程ID终止进程 |
PURGE BINARY LOGS | 清除二进制日志文件 |
PURGE RELAYLOGS | 清除中继日志文件 |
SHOW MASTER STATUS | 查看主服务器状态 |
CONNECTION ADMIN | 管理普通用户的连接权限 |
INSTALL SOFTWARE | 安装软件包等操作 |
UNLOCK TABLES | 锁定表解锁 |
REFERENCES | 引用其他用户的对象,如视图、触发器等 |
| REPLICATION CLIENT ON *.* TO * @ * PASSWORD = ‘password’ REPLICATION SLAVE ON *.* FROM master_ip MASTER_USER=’master_user’ MASTER_PASSWORD=’master_password’ MASTER_LOG_FILE=’file’, MASTER_LOG_POS=pos; START SLAVE; CHANGE MASTER TO MASTER_HOST=’new_master_ip’, MASTER_USER=’new_master_user’, MASTER_PASSWORD=’new_master_password’, MASTER_LOG_FILE=’file’, MASTER_LOG_POS=pos; START SLAVE; RESET MASTER; RESET SLAVE; FLUSH SLAVE; KILL SLAVE; BEGIN; COMMIT; ROLLBACK; SELECT … INTO … FROM …; INSERT INTO …; DELETE FROM …; UPDATE …; CREATE …; ALTER …; DROP …; TRUNCATE …; GRANT …; REVOKE …; CREATE …; INDEX …; DESCRIBE …; EXPLAIN …; CHECKSUM …; CREATE … EXTENSION …; ALTER EXTENSION …; INSTALL … EXTENSION …; UNINSTALL … EXTENSION …; RENAME … TO …; REPLACE … INTO … FROM …; LOAD … INFILE … INTO …; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; SELECT … INTO … FROM … INTO DB, TAB, FIELD, FORMAT, NULL AS ‘column_name’ FROM DUAL; **SELECT … INTO … FROM
原创文章,作者:未希,如若转载,请注明出处:https://www.kdun.com/ask/639989.html
本网站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本网站。如有问题,请联系客服处理。
发表回复