I never bypassed any major release when upgrading, however, with the
exception of 4.1 -> 5.0 all the upgrades were _really_ painless. Not
even a dump was ever needed there.
For the upgrade from 4.1 to 5.0 everything was different: A dump is
definitely needed here, as there are still some serious bugs
(crashes, data corruption...) in 5.x regarding the compatibility with
the old table formats (especially MyISAM), even though some of them
have been fixed recently.
Pay also special attention to the many new reserved words (http://
www.futhark.ch/mysql/105.html). I would do a grep over all table
definitions or the general query log to make sure nothing collides
with one of the new reserved words and make sure they are properly
escaped if they do.
If DECIMAL datatypes are used anywhere, be sure to change the table
definitions to the new semantics.
I think these are the three most important steps that could really
hurt you.
So, with the dump needed anyway for 5.0, I personally would give it a
try to bypass the upgrade to 4.1 and just load the 4.0 dump (5.0 ->
5.1 seems to be better again), even if the one-major-upgrade-at-a-
time is the official policy. Just be sure to get the character set/
collation settings right and I think you should be quite fine.
But of course this also depends on the complexity of your
applications. And you should be prepared to have access to the code
of all the applications accessing the database, because you'll
probably have to fix some minor things anyway: The optimizer
sometimes takes a surprisingly different path and so some queries
might need to be rewritten, small syntax changes (e.g. JOINs) might
also affect you. But I found this to be rather easy to deal with.
Good luck!
Beat
-----
"The major difference between a thing that might go wrong and a thing
that cannot possibly go wrong is that when a thing that cannot
possibly go wrong goes wrong it usually turns out to be impossible to
get at or repair." (Douglas Adams, Mostly Harmless)
MeteoNews AG, Beat Vontobel (IT, Research & Development)
E-Mail: b.von...@meteonews.ch
IT Department: +41 (0)43 288 40 54
Main phone: +41 (0)43 288 40 50
Mobile: +41 (0)79 738 79 70
Run your mysqldump like this:
mysqldump -uroot -p -S /tmp/mysql.sock --opt --skip-lock-tables
--quote-names -Q -a --all-databases > all_dbs_in_old_mysql.sql
Keep in mind that there are huge differeneces between 4.0 and 5.0.
Joins are different, fulltext searching, char and varchar are different
along with timestamps and password hashes.
Don't worry about going to 4.0.27. That version just fixes some remote
buffer overflows.