Show the size of all databases in MB
which database is the largest | show mysql database size | database disk usage | mysql | mariadb | disk-spacemysql -e 'SELECT table_schema AS db, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS mb FROM information_schema.tables GROUP BY table_schema ORDER BY mb DESC;'Sums up the size of data and indexes per database from information_schema and sorts in descending order. Quickly shows which website or application uses the most database space. The values are InnoDB estimates and may differ from the space used on disk.
Note: On Plesk servers, run it via plesk db or as admin.
Also searched as
- which database is the largest
- show mysql database size
- database disk usage