mysql find database size

mysql -e 'SELECT table_schema 'Database Name', SUM(data_length + index_length) 'Size in Bytes', ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) 'Size in MiB' FROM information_schema.tables WHERE table_schema = 'some_database';'

Leave a Reply

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