Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freeing up disk space from information_schema

Status
Not open for further replies.

wilsjay22

Technical User
Jun 24, 2022
1
0
0
US
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. My OS is Ubuntu/Linux. MySQL version 5.7.22. My disk currently has 4% free space available.

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. Priority #1 is free up disk space and keep this server going. Priority #2 is get replication working again.

fyi-
This server/ aka: Master info
--------------------------------------------------------------
SHOW MASTER STATUS;
# File, Position, Binlog_Do_DB, Binlog_Ignore_DB, Executed_Gtid_Set
mysql-bin.002605, 50840918, '', '', ''

Slave 1 info
--------------------------------------------------------------
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 info
--------------------------------------------------------------
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'
 
Might be best to just get a larger hard drive and migrate the data over.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top