Upgrade MySQL from 5.1.26-rc to 5.5.15

Source: Internet
Author: User
I upgraded MySQL from 5.1.26-rc to 5.5.15. The source code packages downloaded from the official website are compiled. MySQL5.5.15 is provided by my colleagues. By

Today, I upgraded MySQL from 5.1.26-rc to 5.5.15. The source code packages downloaded from the official website are compiled. MySQL 5.5.15 is provided by my colleagues. By

Today, I upgraded MySQL from 5.1.26-rc to 5.5.15. The source code packages downloaded from the official website are compiled. MySQL 5.5.15 is provided by my colleagues.

Because the existing database uses the innodb engine, mysqldump is used to export the backup and then import the backup for upgrade.

Steps for upgrading:
1. Back up existing databases
2. rename the existing MySQL Program (to prevent the upgrade from failure and recovery)
3. Back up the existing permission database separately
4. Replace existing MySQL programs
5. Start MySQL 5.5.15 and import the backup.
Note: pay special attention to mysql Log prompts

When MySQL 5.5.15 is started after the upgrade, many error messages are prompted, which can be modified according to the error prompt to quickly solve the problem.

A. I installed and upgraded MySQL 5.5.15. The compiling directory is/usr/local/mysql, but the directory where our online database programs are located is/usr/local/mysql5, I upgraded the program online and deployed the program according to the online service. Therefore, the following error is prompted during the startup process:
120717 11:19:41 mysqld_safe The file/usr/local/mysql/bin/mysqld
Does not exist or is not executable. Please cd to the mysql installation
Directory and restart this script from there as follows:
./Bin/mysqld_safe &
See for more information

Solution: Change the program directory to/usr/local/mysql.

B. The [mysqld] Option section in the configuration file has the following options: log-slow-queries. This option belongs to the old version and is modified according to the mysql log File GY_ZGC_97.err error prompt:
120717 11:21:32 mysqld_safe Starting mysqld daemon with databases from/home/mysql/data
120717 11:21:32 [Warning] The syntax '-- log-slow-queries' is deprecated and will be removed in a future release. please use '-- slow-query-log'/' -- slow-query-log-file' instead.
120717 11:21:32 InnoDB: The InnoDB memory heap is disabled
120717 11:21:32 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
120717 11:21:32 InnoDB: Compressed tables use zlib 1.2.3
120717 11:21:33 InnoDB: Initializing buffer pool, size = 1000.0 M
120717 11:21:33 InnoDB: Completed initialization of buffer pool

Solution: replace log-slow-queries in the configuration file with slow-query-log.

C. mysql has an option -- datadir. The directory specified by this option has no permission:
120717 11:21:33 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights
InnoDB: the directory.
InnoDB: File name./ibdata1
InnoDB: File operation call: 'create '.
InnoDB: Cannot continue operation.
120717 11:21:33 mysqld_safe mysqld from pid file/home/mysql/data/GY_ZGC_97.pid ended

Solution: Change the mysql data DIRECTORY owner to mysql user: chown-R mysql. mysql data

D. the mysql configuration file has the following options: default-character-set = utf8
120717 11:22:46 InnoDB: 1.1.8 started; log sequence number 0
120717 11:22:46 [ERROR]/usr/local/mysql/bin/mysqld: unknown variable 'default-character-set = utf8'
120717 11:22:46 [ERROR] Aborting

120717 11:22:46 InnoDB: Starting shutdown...
120717 11:22:47 InnoDB: Shutdown completed; log sequence number 1595675
120717 11:22:47 [Note]/usr/local/mysql/bin/mysqld: Shutdown complete

120717 11:22:47 mysqld_safe mysqld from pid file/home/mysql/data/GY_ZGC_97.pid ended

Solution: comment out the option

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.