MySQL and MariaDB innodb_file_per_table

For those of you pushing your MySQL instances to higher levels, you'll have realized at some point that all InnoDB tables share their indexing space into a single file (ibdata1, usually). This has several very bad outcomes:
  • the ibdata1 file becomes huge after some time (we've seen it pass the 8GB bar)
  • starting the MySQL server takes longer
  • deleting an InnoDB table *doesn't* reduce the space used by ibdata1
  • you have to shutdown your server, remove ibdata1 completely, then restart the server in order to reinitialize the ibdata1 file to a 0-size file (but th

Important meetings

Sometimes I like to treat this blog as a personal one and write down things that might affect in fundamental ways our future... or at least my own future, potentially. Anyway, I'm currently living in Peru and had a series of meeting over the last two months with the new Electronical Government Office (ONGEI).

Import MySQL tables from .myd

This is an easy procedure to import any MyISAM table that you would have in .myd, .myi and .frm format, into a local database. I assume you have MySQL server and a MySQL client on your local machine.
  • First, identify the name of the table (that's the name before the ".myd" extension).
  • Connect to your local database and create a dummy database (let's call it "import")
  • Create a table inside that database with the exact same name as the one you need to import.