Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I changed the only two InnoDB tables on a replication slave to MyISAM, so the slave now only has MyISAM tables.

Can I now remove the ibdata1 file completely?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

In case you do not have a single InnoDB table, then yes, you can remove the ibdata file and the ib_logfile[01] files.

However, note:

  • With MySQL 5.6 there are system InnoDB tables, which means you don't want to remove the InnoDB files ever.
  • It is best done when the server is stopped.
share|improve this answer
    
+1 for the MySQL 5.6 caveat. –  RolandoMySQLDBA Jul 16 '13 at 14:04
add comment

The file ibdata1 is tablespace for the InnoDB Engine.If you remove it you will not be able to Start MySQL Server.

If you don't have InnoDB tables still you should not remove ibdata1 file.When you install MySQL ibdata1 is created by default with initial size of 10MB and has four types of information

  1. Table Data
  2. Table Indexes
  3. MVCC (Multiversioning Concurrency Control) Data
  4. Table Metadata
  5. Double Write Buffer
  6. Insert Buffer

Some times ibdata1 grows endlessly,In Case you need help on how to shrink ibdata1 size you can follow steps suggested by RolandoMySQLDBA On MySql - Clean ibdata1 .

share|improve this answer
1  
If you remove them, a mysql startup will just regenerate them. Perhaps --skip-innodb should be added to /etc/my.cnf after shutting down and deleting, but before starting back up. –  RolandoMySQLDBA Jul 16 '13 at 14:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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