I had huge problems with the watchdog module for Drupal, it was creating an unbelievable amount of entries to the database. MySQL stopped working because of this. I rolled back to an earlier point when I had some space and was able to log in and remove the module. I ran the SQL command
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;
So when watchdog was eating all of the disc space I was getting the response like this
Query result before watchdog removed
Anyway I remove the module and the table goes with it. I run the same query and I don't see the table there again.
Query result after watchdog removed
I go to the console and enter the command
df -h
Console result after watchdog removed
So the console is saying that there is still a huge amount of memory used up. Why is this? should I be worried about it?
Without too much info to go on, Im going to say you have hit a "bug"
http://bugs.mysql.com/bug.php?id=1341
Taking data from this answer How to shrink/purge ibdata1 file in MySQL
as you want to reclaim the space from ibdata1 you actually have to delete the file:
Before you restore you probably want to enable the innodb_file_per_table
option in your config file
The instructions above can actually be limited to JUST the innodb ones to make the process slightly safer