mysqldf (377B)
1 #!/bin/bash 2 # show mysql disk usage 3 # https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database 4 5 echo 'SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC;' | 6 mysql -t -u root -p | less