zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

MySQL – Database size

June 6, 2010 by Igor Drobot Leave a Comment

As I know, there are two ways to calculate the MySQL database size:

First one:

1
du -shc /var/lib/mysql/*

du -shc /var/lib/mysql/*

Second one:

1
SELECT table_schema ,SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;

SELECT table_schema ,sum( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;

Filed Under: Bash, Linux, MySQL Tagged With: MySQL

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *