tags:

views:

25

answers:

1

I have a zip file for a Windows MySQL 4.x installation database which includes the MySQL files and the databases files (.myi, .myd, frm). I have a Windows MySQL 5.0 running installation.

I need to bring one of the databases from the zip file to life in the current active MySQL 5.0. How can this be done?

A: 

With your first database running in your mysql 4 database, run a mysql dump

mysqldump dbname > dbname.sql

Then load that file up in your mysql 5 database...

mysql -e "create database dbname"
mysql dbname < dbname.sql

Of course you'll have to set up your users manually.

SorcyCat
Is there a solution without having a running mysql4? I can't find mysql4 on mysql.com to install.
Tony_Henrich
@Tony_Henrich: http://www.technocation.org/mirror/mysql/downloads/mysql/4.1.html
AJ
I ended up installing a new mysql 4 on the server. Copied all the data files from the zip file. Deleted the installation ibdata1 file and copied the one from the zip file. When I deleted the two installation log files, mysql didn't start and complained about log file mismatches so I copied back the original log files. Started MySQL and created the user for the database and the database was up and running.
Tony_Henrich