Upgrading from MySQL 4.1 to 5.0


It is good practice to back up your data before installing any new version of software. Although MySQL works very hard to ensure a high level of quality, you should protect your data by making a backup.

To upgrade to 5.0 from any previous version, MySQL recommends that you dump your tables with mysqldump before upgrading and reload the dump file after upgrading. Use the --all-databases option to include all databases in the dump. If your databases include stored programs, use the --routines and --events options as well.

In general, you should do the following when upgrading from MySQL 4.1 to 5.0:

If your MySQL installation contains a large amount of data that might take a long time to convert after an in-place upgrade, you might find it useful to create a dummy database instance for assessing what conversions might be needed and the work involved to perform them. Make a copy of your MySQL instance that contains a full copy of the mysql database, plus all other databases without data. Run your upgrade procedure on this dummy instance to see what actions might be needed so that you can better evaluate the work involved when performing actual data conversion on your original database instance.

Several visible behaviors have changed between MySQL 4.1 and MySQL 5.0 to make MySQL more compatible with standard SQL. These changes may affect your applications.

The following lists describe changes that may affect applications and that you should watch out for when upgrading from MySQL 4.1 to 5.0.

Server Changes
SQL Changes
C API Changes