首页 / MYSQL / 常用mysql系统表及命令
常用mysql系统表及命令
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了常用mysql系统表及命令,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1944字,纯文字阅读大概需要3分钟。
内容图文
![常用mysql系统表及命令](/upload/InfoBanner/zyjiaocheng/512/534361be01bc4bcca22e527f4f31fb3f.jpg)
常用系统表
查看当前数据库连接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)
常用mysql系统表及命令
标签:schema cte abc 操作 const 系统变量 用户 har mysql系统表
本文系统来源:https://www.cnblogs.com/shoshana-kong/p/11430903.html
内容总结
以上是互联网集市为您收集整理的常用mysql系统表及命令全部内容,希望文章能够帮你解决常用mysql系统表及命令所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。