Steps to upgrade MySQL 5.1 to MySQL 5.5

Source: Internet
Author: User

MySQL basic information

1. Installation directory
/usr/local/mysql

2. Data Catalog

/home/mydb

3. Configuration directory

/etc/my.cnf

4. Startup script
/etc/init.d/mysql

Pre-upgrade actions

1, stop the online business, backup data

  Backup: mysqldump-uroot-p–all-databases >/home/mysql/meng/databk_20150207.sql

stop: /etc/init.d/mysql stop

#备份数据目录: mkdir /home/mydb5.1

#cp /home/mydb/*  /home/mydb5.1/

2, backup configuration file

Cp/etc/my.cnf/etc/my.cnf_bak

Upgrade

1, according to the installation mysql-5.5 version

Tar XF mysql-5.5.36.tar.gz

CD mysql-5.5.3

Cmake-dcmake_install_prefix=/usr/local/mysql-dsysconfdir=/etc

-dmysql_datadir=/home/mydb/-dmysql_tcp_port=3306

-dmysql_unix_addr=/tmp/mysqld.sock

-dmysql_user=mysql

-dextra_charsets=all

-dwith_readline=1

-dwith_ssl=system-dwith_embedded_server=1

-denabled_local_infile=1-dwith_innobase_storage_engine=1

Make && make install

2, copy 5.5 of the configuration file

CP SUPPORT-FILES/MY-HUGE.CNF/ETC/MY.CNF

3. Modify the configuration file

Modify/ETC/MY.CNF files according to your environment

4. Start MySQL

/etc/init.d/mysql start

5. Perform the upgrade command

/usr/local/mysql/bin/mysql_upgrade

The upgrade was successful.




Steps to upgrade MySQL 5.1 to MySQL 5.5

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.