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