1, upgrade mode: directly to the MySQL5.1.72 installation directory to overwrite the running MySQL directory
2. Backup Database Mysqldump-uroot-a-F >/data/mysql_upgrade_bak/all_databases.sql
A problem may be encountered here: Mysqldump:got error:1556:you can ' t use locks with log tables. When using LOCK TABLES
Solution:
# which mysqldump
/usr/bin/mysqldump
Modify/etc/profile
Export path= $PATH: $MYSQL _base/bin-->export path= $MYSQL _base/bin: $PATH (move $mysql_base/bin to front of $path)
Note:-F, flush logs, can regenerate a new log file, including, of course, the Log-bin log
3. Backup installation directory
TAR-ZCVF Mysql5.0.92_bak.tar.gz/usr/local/mysql
4, Backup Data directory
TAR-ZCVF Mysql5.0.92_data.tar.gz/data/mysql_data/mysql
5, Backup configuration file
Cp/etc/my.cnf./
6. Close MySQL
Mysqladmin shutdown
7, upgrade (decompression replacement)
TAR-ZXVF mysql-5.1.73-linux-x86_64-glibc23.tar.gz
rm/usr/local/mysql/*
MV mysql-5.1.73-linux-x86_64-glibc23/*/usr/local/mysql/*
8, restart
Mysqld_safe &