PDA

View Full Version : Moving servers > moving from MySQL MySQL 4.1.14 to MySQL 4.0.25


Thomas P
Thu 17th Aug '06, 9:55am
Hello,

we are moving servers to get more CPU power, we have a P4 3.0Ghz and are about to move to an Opteron 175 DualCore. :cool:

Problem is that we have to downgrade our db from MySQL 4.1.14 to MySQL 4.0.25.

So afaik we have to use the following syntax to dump the db:
mysqldump --skip-opt --compatible=mysql40 --add-drop-table -hlocalhost -uXY -pPWD dbname > dbname.sql

But this seems to blow up the db size from ~600MB to ~1GB.

Is there any other way which doesn't generate this much overhead?

How can I reduce the db size to get the original size?

Thanks,
-Tom

eva2000
Thu 17th Aug '06, 10:33am
best advice, upgrade new server's MySQL from 4.0.25 to 4.1.21 and then just backup via mysqldump and import :)

Thomas P
Thu 17th Aug '06, 4:24pm
I'll see what we can do, we don't have too much influence since we are on managed server plans.

Will it hurt if we migrate using the above mentioned options in the meantime?

kmike
Fri 18th Aug '06, 2:50am
If the file size is your concern, you can always compress it on the fly when dumping:
mysqldump --skip-opt --compatible=mysql40 --add-drop-table -hlocalhost -uXY -pPWD dbname | bzip2 -9 > dbname.sql.bz2
And decompress when restoring:
bunzip2 -cd dbname.sql.bz2 | mysql -hlocalhost -uXY -pPWD dbname

eva2000
Fri 18th Aug '06, 3:13am
I'll see what we can do, we don't have too much influence since we are on managed server plans.

Will it hurt if we migrate using the above mentioned options in the meantime?
it shouldn't hurt but depends if there's any bugs outstanding in 4.1.14 for the mysqldump --compatible option.. IIRC mysql 5.x had a bug with --compatible option stripping vB database's auto increment fields in tables.. messed up vB databases when going from mysql 5.x to 4.1/4.0.xx

hence why i recommend easiest and safest way is to upgrade mysql on new server to at least same version as old server or 4.1.21 :)

Thomas P
Fri 18th Aug '06, 6:28am
I see - many thanks, guys :)