Page 1 of 1

From Win2000/IIS to Linux/Apache?

Posted: Fri Feb 21, 2003 11:53 am
by rxsid
Hi all,

I have PHP & MySQL installed on a Win2000/IIS system. I may be moving (due to requirements at work) to a Linux/Apache system in the near future.

I'm wondering if it's a hassle, or even possible, to move the MySQL database from the windows/IIS box to the Linux/Apache box? Any corruption, or other problems associated with this type of move?

Thanks!

P.S. I also have the option of leaving Win2000 in place but switching to Apache service. Would this be "worth" it? In other words, would that setup be a better web server environment (for PHP & MySQL) than the Win2000/IIS setup?

Posted: Fri Feb 21, 2003 1:43 pm
by BDKR
None whatsoever! Just dump your database to files using mysqldump then recreate on the new Linux boxen.

Cheers,
BDKR

Posted: Sat Feb 22, 2003 6:32 am
by twigletmac
Move to the Linux/Apache environment and don't worry about your MySQL data files - as BDKR said they'll be fine.

Mac

Posted: Sat Feb 22, 2003 7:08 am
by BDKR
There is also another option that is the fastest, albiet a little network intesive if you have a large database (or databases as we do). From the linux box, in a shell, type in...

mysqldump -h(the windows box) -P(If you are not using a standard port) -u(user name) -p(you will be prompted for your password) (the database name) | mysql (the database name)

What this will do is dump the database from the windows box, or whatever machine is pointed too with the -h switch, and pipe it's output into the mysql client wich will read the dumpfile and rebuild your database. I do this all the time when I need to get all or a portion of the data from the production db onto my system for testing. You can also rebuild a db in the same fashion from binlog files by piping mysqlbinlog output into the mysql client.

Check the manual for usage.

Cheers,
BDKR