MySQL upgrades from 5.0 to 5.1

Source: Internet
Author: User

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 &

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.