phpmysqlphpmyadminxampp

Coverting a .BAK file into a .SQL for use in XAMPP phpmyadmin


I have a .bak file and I need to import it into a database (need a .sql file) using xampp's phpmyadmin (local development). I have only found solutions for Windows SQL server. How can I do this for xampp?

I got the file from a client which means I don't have the access to their server and I can't do a database export.


Solution

  • I think you would need to follow below steps in order to complete migration from SQL Server Database to MySQL.

    1. Restore .bak file on your local SQL Server Instance.

    2. You can use MySQL WorkBench's Database Migration tool to convert your backup file to mysql database on your local machine.

      MySQL WorkBench Tool Database Migration

    1. Once MySQL database is in place, you can dump it into .sql file.

      $ mysqldump -u [uname] -p[pass] db_name > db_backup.sql
      
    2. Finally you can run this sql file on your phpmyadmin interface.