commit 28f8fac358e3260081ff8c9b92b5fc4322c98fb4 parent 4d47137695362553cc963b6727da064d54c43cf6 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Thu, 20 Oct 2016 21:01:23 +0200 mysqldf Diffstat:
mysqldf | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/mysqldf b/mysqldf @@ -0,0 +1,6 @@ +#!/bin/bash +# show mysql disk usage +# https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database + +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;' | + mysql -t -u root -p | less