1. Update method: directly overwrite the MySQL5.1.72 installation directory to the running Mysql directory.
2. Back up the database mysqldump-uroot-A-F>/data/mysql_upgrade_bak/all_databases. SQL
Possible problems: 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 the front of $ PATH)
Note:-F is flush logs, which can be used to generate new log files, including log-bin logs.
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. Back up the configuration file
Cp/etc/my. cnf ./
6. Disable mysql
Mysqladmin shutdown
7. Upgrade (decompress and replace)
Tar-zxvf mysql-5.1.73-linux-x86_64-glibc23.tar.gz
Rm/usr/local/mysql /*
Music mysql-5.1.73-linux-x86_64-glibc23/*/usr/local/mysql /*
8. Restart
Mysqld_safe &