Upgrade mysql from 5.0 to 5.1

Source: Internet
Author: User

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 &

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.