du -sh /var/lib/mysql
SELECT table_schema AS "Database",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
GROUP BY table_schema;
SELECT table_schema AS "Database",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)"
FROM information_schema.tables
GROUP BY table_schema;
SELECT TABLE_NAME AS "Table",
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
AND TABLE_NAME = 'your_table_name';
SELECT table_schema AS "Database",
TABLE_NAME AS "Table",
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.tables
ORDER BY data_length + index_length DESC;
SELECT TABLE_NAME AS "Table",
ROUND((index_length / 1024 / 1024), 2) AS "Index Size (MB)"
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
AND TABLE_NAME = 'your_table_name';