Tag: Database

  • Recovering MySQL or MariaDB from .frm File

    This happened to me today, I found old project codes without SQL dump. Just want to check if project is still reusable. Following are the two ways you can recover database schema from FRM file.

    Using mysqlfrm utility by oracle
    This is pretty handy command line utility from MySQL Team. Check out the official Documentation.

    Online version of mysqlfrm
    This is not official one, but TwinDB team created Database Recovery portal to generate schema from .idb and .frm files. Must be using mysqlfrm utility behind the UI.

    This log is for future reference purpose, If you have any other tool, please mention it in comments.

  • Clean Up time

    This is timeĀ  to say bye to year 2008. And count up remaining in Dasvidaniya Style. Long road to go yet, just checked my Phpmyadmin for regular backup after a long time. the Backup was around 31 MB !! Confused ?? I was too. Most of memory was consumed by Statpress plugin and few other plugins that i used some months back.

    Deletion of those plug-in, doesn’t delete there tables from database, so the garbage was still there. just cleaned those old tables. saved my lots of memory.

    Heres a little SQL trick I found from Devils Workshop , to clean up the revisedĀ  versions of the post we publishes. Little change in the SQL Command from me as given SQL command was giving error.

    DELETE FROM `wp_posts`WHERE `post_type` LIKE ‘revision’;

    Now my Database is just 1.5 MB, Good to hear (Not only for my server but also for speed of blog access.)