-- 查看主键约束
SELECT * FROM information_schema.`TABLE_CONSTRAINTS`;
-- 查看外键约束
SELECT * FROM information_schema.`REFERENTIAL_CONSTRAINTS`;
-- 查看表权限信息
SELECT * FROM information_schema.`TABLE_PRIVILEGES`;
-- 查看所有列DML权限信息
SELECT * FROM information_schema.`COLUMN_PRIVILEGES`;
-- 查看表索引信息
SELECT * FROM information_schema.`STATISTICS`;
-- 查看用户权限信息
SELECT * FROM information_schema.`USER_PRIVILEGES`;
-- 查看触发器
SELECT * FROM information_schema.`TRIGGERS`;
-- 查看视图
SELECT * FROM `information_schema`.`VIEWS`;
-- 查看存储过程或存储函数
SELECT * FROM `information_schema`.`ROUTINES`;
--查看事件信息
SELECT * FROM information_schema.events;
备注:查看Events是否开启:
mysql> select @@global.event_scheduler;
mysql> show variables like 'event_scheduler';