常用系统表
查看当前数据库连接ip信息
– select * from information_schema.PROCESSLIST
当前mysql实例中所有数据库的信息
– select * from information_schema.SCHEMATA
数据库中的表信息
– select * from information_schema.TABLES
当前数据库中的列信息
– select * from information_schema.COLUMNS
数据库中的索引信息
– select * from information_schema.STATISTICS
用户权限
– select * from information_schema.USER_PRIVILEGES
方案权限
– select * from information_schema.SCHEMA_PRIVILEGES
表权限
– select * from information_schema.TABLE_PRIVILEGES
列权限
– select * from information_schema.COLUMN_PRIVILEGES
字符集
– select * from information_schema.CHARACTER_SETS
字符集 对照信息
– select * from information_schema.COLLATIONS
存在约束的表信息
– select * from information_schema.TABLE_CONSTRAINTS
存在约束的列信息
– select * from information_schema.KEY_COLUMN_USAGE
数据库中的视图
– select * from information_schema.VIEWS
触发器信息
– select * from information_schema.TRIGGERS
常用命令
所有数据库名
– show DATABASES
所有表名
– show TABLES
abc数据库中的所有表名
– show tables from abc
所有表信息
– show table status
– show table status from abc
表信息
– desc information_schema.TABLES
某表的列信息
– show columns from information_schema.TABLES
某表的创建语句
– show create table test
某数据库的创建语句
– show create database abc
数据库的连接及操作信息
– show processlist
表状态 包括表
– show table status
某表的索引信息
– show index from information_schema.tables
系统变量名和值
– show variables
存储引擎信息
– show ENGINES
显示当前用户
– select user()
获取当前日期
– select now()
获取当前日期
– select dayofmonth(current_date)
– select month(current_date)
– select year(current_date)
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2018-08-29 动态代理:JDK动态代理和CGLIB代理的区别
2018-08-29 Linux常用命令学习
2018-08-29 temp5
2018-08-29 20180829编程思考
2018-08-29 异常捕获使用总结