博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql的cmd窗口查看数据库信息
阅读量:6714 次
发布时间:2019-06-25

本文共 788 字,大约阅读时间需要 2 分钟。

 

1.mysql -uroot -p 123456

2.show databases; 查看全部数据库

3.select database(); 查看当前数据库

4.show variables like 'port';

5. 查看当前数据库大小,如查看springdata库大小

select concat(round(sum(data_length)/(1024*1024),2) + round(sum(index_length)/(1024*1024),2),'MB') as 'DB Size'

-> from tables
-> where table_schema='springdata';

6. 查看数据所占有的空间

select concat(round(sum(data_length)/(1024*1024),2),'MB') as 'DB Size'

-> from tables
-> where table_schema='springdata';

7.查看索引所占用的空间

select concat(round(sum(index_length)/(1024*1024),2),'MB') as 'DB Size'

-> from tables
-> where table_schema='INVOICE';

8.查看数据库编码

 show variables like 'character%';

9.status

10.show tables;

11. 查看权限

  show grants for 'root'@'localhost';

12.某个人的权限

show grants for 'root'@'localhost';

转载于:https://www.cnblogs.com/springcloud/p/9978232.html

你可能感兴趣的文章
年后跳槽如何准备?(转)
查看>>
Eclipse常用设置汇总
查看>>
python 字典dict类型合并(不能错过哦)
查看>>
程序练习1
查看>>
【OpenCV学习】图像亮度、对比度调节(伽马校正)
查看>>
shell 脚本编写注意事项
查看>>
html5离线应用application cache
查看>>
检查了一下VC2012新增的Intrinsics函数集,发现它支持ARM指令和Haswell新指令
查看>>
Spring自定义属性编辑器
查看>>
不再消极,不再忧虑
查看>>
我的模块加载系统 v20
查看>>
简明Python3教程 5.第一步
查看>>
SharePoint 搜索爬网第三方网站配置
查看>>
总结Movie示例知识点
查看>>
WebUI无阻塞更新的实现
查看>>
协议森林12 天下为公 (TCP堵塞控制)
查看>>
尝试在C++里实现 Java 的 synchronized 关键字
查看>>
POJ-2057 The Lost House 贪心在动态规划中的应用
查看>>
uva10970 Big Chocolate
查看>>
PhoneGap API帮助文档翻译Notification提醒
查看>>