From Win2000/IIS to Linux/Apache?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
rxsid
Forum Commoner
Posts: 82
Joined: Thu Aug 29, 2002 12:04 am

From Win2000/IIS to Linux/Apache?

Post 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?
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

None whatsoever! Just dump your database to files using mysqldump then recreate on the new Linux boxen.

Cheers,
BDKR
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post 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
Post Reply