MySQL查看数据库、表的基本命令
1:show databases;
查看所有的数据库,等同于select schema_name from information_schema.schemata\G。\G 替换;,以纵向报表的形式输出结果,有利于阅读。
java简单毕业论文题目
2. status 查看mysql数据库的运⾏状态
mysql查看所有存储过程
3. use 命令选择数据库 例如 use information_schema,当使⽤此命令后
快速排序的图示select schema_name from information_schema.schemata\G,可以为
format factory无法删除
select schema_name from schemata\G
4. 查看数据库中的表
show tables
同样也可以在information_schema中查看,show命令是⽅便使⽤的简短模式。
select table_name from tables where table_schema=‘jblog’;
delphi最新版本2020下载
5. 查看表结构
desc table_name;
6.查看表状态 show table status from db like 条件
可以查看engine数据库引擎,version,row、index等信息
7.⼩技巧,当多⾏命令输⼊,发现错误后,⽤\c结束。
另,查询数据库运⾏状态的基本命令:
#查询数据库连接
show full processlist;
show status like ‘%Max_used_connections%’;
show status like ‘%Threads_connected%’;#当前连接数
show status like ‘%table_lock%’;#表锁定
show status like ‘innodb_row_lock%’;#⾏锁定
show status like ‘%qcache%’; #查询缓存情况
show variables like “%query_cache%”;
cssmarginpaddingSHOW STATUS LIKE ‘Qcache%’;
show variables like “%binlog%”;
show status like ‘Aborted_clients’;#由于客户没有正确关闭连接已经死掉,已经放弃的连接数量
show variables like ‘%max_connections%’;//查看最⼤连接数量
show variables like ‘%timeout%’;#查看超时时间
show variables like ‘log_%’; #查看⽇志是否启动

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。