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. Let’s say it’s called user.myd, so call the table “user”
  • Disconnect from your database and shut down your MySQL server (Ubuntu: sudo /etc/init.d/mysql stop)
  • Copy the backup files (user.*) into your MySQL data directory (Ubuntu: /var/lib/mysql/import/)
  • Restart your MySQL server (Ubuntu: sudo /etc/init.d/mysql start)
  • Enjoy the imported table.
It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *