3

I tried to check what is consumming my Disk Space on Centos 7, I found these 2 database file:

/var/lib/mysql/pub/vues.ibd: 8.1G /var/lib/mysql/pub/log.ibd: 8.6G

I would like to delete them. pub is the name of my database. And log and vues are tables.

2 Answers 2

3

That would be most unwise. Never fiddle with MySQL files directly.

If you want to delete those tables use SQL:

DROP TABLE pub.vues, pub.log
3
  • droping the table vue maybe dangerous isn't there any other way of reducing the size?....
    – aidonsnous
    Commented Sep 22, 2018 at 12:19
  • The entire data for these tables are in those files. You could create a new table as an extract of those tables and rename the tables.
    – danblack
    Commented Sep 22, 2018 at 13:10
  • @aidonsnous - If your real Question is about disk space and/or shrinking the .ibd file, then start a new Question with that as the focus.
    – Rick James
    Commented Oct 9, 2018 at 20:43
2

As @danblack pointed out it's not the best idea. However to formally answer your question - if you delete the vues.ibd and log.ibd files the InnoDB dictionary will still keep entries about them. If you ever decide to create tables with same name the CREATE TABLE statement will fail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.