MySQL Forums
Forum List  »  Newbie

Freeing up disk space from information_schema
Posted by: Jason Wilson
Date: June 23, 2022 01:05PM

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'

Options: ReplyQuote


Subject
Written By
Posted
Freeing up disk space from information_schema
June 23, 2022 01:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.