Because the latest version of MySQL in the APT Library of Ubuntu is still 5.1, the upgrade MySQL5.5 is only downloaded by itself, and because of the large changes between the two versions, it is important to read the official website's upgrade upgrading from the MySQL 5.1 to 5.5 , make sure your database and configuration apply to the new version.
This article refers to an English-language guideline a step by step guides to upgrading to MySQL 5.5 but has made some adjustments in order and content, especially the official website and this English guide is mysqldump to back up the files before upgrading, and then the way SQL is imported , but this process can be very time-consuming (the database may take more than 10 hours to complete the re-import), I directly in the original database file directory upgrade, the basic is the blink of an eye, of course, I would like to emphasize again, this may not apply to everyone.
The steps are as follows:
The steps are as follows:
1. Stop the current version of MySQL and back up
mkdir Mysql_5.1_backup
CD Mysql_5.1_backup
All subsequent backup operations are performed at Mysql_5.1_backup
1.1 Backup Database with mysqldump, MySQL built-in database and product database can be backed up separately
Mysqldump-u user_name-p–databases mysql > Mysql_db.sql
mysqldump-u user_name-p–databases db_n Ame > Db_name.sql