We help IT Professionals succeed at work.

MYSQL Restore .bak file

webdork
webdork asked
on
Medium Priority
4,494 Views
Last Modified: 2012-05-12
I've got a bak file from a mysql DB. Trying to import to my local mysql using WorkBench. Cant seem to figure it out.

I'm very familiar with SQL Server. MYSQL seems like Greek to me.
Comment
Watch Question

CERTIFIED EXPERT

Commented:
bak files aren't normally mysql

it's used by MSSQL..

are you sure it's a backup from mysql?

Author

Commented:
pretty sure.. See attached screen shot
mysql-back-up-snap.png
CERTIFIED EXPERT

Commented:
Alright that looks like something your hosting party build. Can you open the bak file in a txt editor to see how its formatted?

There is a good chance it is pure SQL and thus you can just copy it into phpmyadmin or push it in through a command line
CERTIFIED EXPERT

Commented:
MySQL and mssql are completely different from install and backup perspective but writing queries is pretty much the same.

Author

Commented:
yes it looks like on giant SQL statement. I've found a myphpadmin front end to the DB. Does that present an easier way to convert to MS SQL Server? Also not sure how to decrypt the password field.
CERTIFIED EXPERT

Commented:
don't think you can decrypt it..

you want to migrate to mssql?

then i think you will have to generate new passwords.

or replicate the encryption method in the mssql server

CERTIFIED EXPERT
Commented:
check out some of the conversion tools out there on the web

http://www.convertmydatabase.com/convert-database/mysql-mssql.html

The problem is that you need to know what encrypts the field. is it the simple use of the mysql command password()

or was it done through PHP or any other logic.. could even be javascript (although highly unlikely)

Author

Commented:
I have access to all the php files that process a new record. Not sure how to find the encrypt routine in all the files.

Author

Commented:
Excellent support and response time.