旧行李 2009-11-14 06:40 采纳率: 25%
浏览 197
已采纳

如何获得 mysql 数据库的大小?

How to get size of a mysql database?
Suppose the target database is called "v3".

转载于:https://stackoverflow.com/questions/1733507/how-to-get-size-of-mysql-database

  • 写回答

7条回答 默认 最新

  • 胖鸭 2009-11-14 06:46
    关注

    Run this query and you'll probably get what you're looking for:

    SELECT table_schema "DB Name",
            ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
    FROM information_schema.tables 
    GROUP BY table_schema; 
    

    This query comes from the mysql forums, where there are more comprehensive instructions available.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料