Freeing up disk space from information_schema
I have unexpectedly inherited a MySQL deployment. The server is running low on disk space. Running the query below it looks like infromation_schema has 24,700MB free space.
SELECT table_schema "database name",
sum( data_length + index_length ) / 1024 / 1024 "database size in MB",
sum( data_free )/ 1024 / 1024 "free space in MB"
FROM information_schema.TABLES
GROUP BY table_schema
order by sum( data_free )/ 1024 / 1024 desc;
Any help into how I can reclaim some of this space?
Side note I have been told there are also 2 slave servers that are no longer synching pointed at this server as their master.
fyi-
Master
--------------------------------------------------------------
SHOW MASTER STATUS;
# File, Position, Binlog_Do_DB, Binlog_Ignore_DB, Executed_Gtid_Set
mysql-bin.002605, 50840918, '', '', ''
Slave 1
--------------------------------------------------------------
SHOW SLAVE STATUS;
Master_Log_File, Read_Master_Log_Pos,Relay_Log_Pos, Slave_IO_Running, Slave_SQL_Running
mysql-bin.001426,25768038, '376757', 'No', 'No'
Slave 2
--------------------------------------------------------------
SHOW SLAVE STATUS;
Master_Log_File, Read_Master_Log_Pos,Relay_Log_Pos, Slave_IO_Running, Slave_SQL_Running
mysql-bin.001676, 97815725, 4, 'No', 'Yes'