This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

Server Move


avatar
Rushian 0
From: -
Server Move

I've been running my website for 4 years on the same hardware (dual P3-550, and WinNT4!) but it's time to upgrade. Grinning Face

I've built a new Win2003 server, but I'm wondering which versions of PHP and MySQL I should install. I'm currently running PHP version 4.3.9 and MySQL 4.1.11-nt.

Should I upgrade to the 5.x versions of both?

Also, how do I move the databases to the new box?

Thx!

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: Server Move
avatar
OP 0
From: -
Server Move

Worked! Thanks! Smiling Face
1 Re: Server Move
avatar
Administrator
1340
From: Vienna, Austria
Server Move

Sounds like your username/password for the MySQL server is different then on the older box.

You could write a new configuration file with this script:
http://www.esselbach.com/thread.php?id=396
1 Re: Server Move
avatar
OP 0
From: -
Server Move

and import the SQL dump on the new box with:
mysql -uusername -ppassword databasename < backup.sql

I had to create a blank database first, then the command worked.


But! I still can't run the web site.

PHP (4.4.4) is working, and MySQL (4.1.22) is started, but I get:
Error: Can't open a persistent connection to the MySQL database server


Same thing happens when I try to load the admin page. After logging in, I get the same error.

Do I need a virgin config file or something?
1 Re: Server Move
avatar
Administrator
1340
From: Vienna, Austria
Server Move

MySQL 4.1.x and higher. Some older PHP scripts are incompatible with MySQL 5.0 as well.

I currently use on my servers PHP 5.2.0 and MySQL 5.0.32, but I do not run old scripts Winking Face
1 Re: Server Move
avatar
OP 0
From: -
Server Move

Which version of MySQL to you recommend?
1 Re: Server Move
avatar
Administrator
1340
From: Vienna, Austria
Server Move

Should I upgrade to the 5.x versions of both?

You can, but some older PHP scripts may break. I would at least upgrade to the latest version of PHP 4 (4.4.4) because of security issues in the older PHP version

Also, how do I move the databases to the new box?

You could dump the database with:

mysqldump -uusername -ppassword databasename > backup.sql

and import the SQL dump on the new box with:

mysql -uusername -ppassword databasename < backup.sql

You need to replace username with your MySQL username, password with the MySQL password and databasename with the name of your database.

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.