1:show databases;
查看所有的数据库,等同于select schema_name from information_schema.schemataG。G 替换;,以纵向报表的形式输出结果,有利于阅读。
2. status 查看mysql数据库的运行状态
3. use 命令选择数据库 例如 use information_schema,当使用此命令后
select schema_name from information_schema.schemataG,可以为
select schema_name from schemataG
4. 查看数据库中的表
show tables
同样也可以在information_schema中查看,show命令是方便使用的简短模式。
select table_name from tables where table_schema='jblog';
5. 查看表结构
desc table_name;
6.查看表状态 show table status from db like 条件
可以查看engine数据库引擎,version,row、index等信息
7.小技巧,当多行命令输入,发现错误后,用c结束。
-------------------------------------------------------------
另,查询数据库运行状态的基本命令:
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ri-ji/60128.html