PS: MySQL 5.5 series has become a stable version for some time, but according to my survey, it is still dominated by the 5.1 series in the production environment. In large Chinese companies, it is only determined that Jinshan is using 5.5.
Several of the company's advertising statistics servers, the previous O & M directly uses the built-in MySQL 5.0 series. The new programmer writes a new advertisement statistics program and uses the innodb Storage engine. It is occasionally found that 5.0 of the innodb engine does not support well, and many concurrent connections to the database may lead to Lost connections, so I want to upgrade to 5.5. Because 5.0 has been installed, you do not want to compile and install it. I directly searched for a 5.5 yum source compiled in foreign countries, directly upgraded it, and ran for a month, and found it very stable! Share the following information:
1. Install MySQL 5.5.x yum Source:
Rpm-Uvh http://repo.webtatic.com/yum/CentOS/5/latest.rpm
2. Install the MySQL client support package:
Yum install libmysqlclient15 -- enablerepo = webtatic
3. Uninstall the software packages of earlier MySQL versions:
Yum remove mysql -*
4. Install the MySQL 5.5 client and server:
Yum install mysql55 mysql55-server -- enablerepo = webtatic
5. Start the MySQL System Service and update the database:
/Etc/init. d/mysqld restart
Mysql_upgrade
6. Appendix: my. cnf configuration for this server
Skip-locking
Skip-name-resolve
Key_buffer = 1024 M
Back_log = 3000
Max_allowed_packet = 4 M
Table_cache = 512
Sort_buffer_size = 8 M
Read_buffer_size = 8 M
Myisam_sort_buffer_size = 1024 M
Thread_caching = 512
Query_cache_size = 512 M
Set-variable = wait_timeout = 60
Thread_concurrency = 4
Log-slow-queries = slow. log
Long_query_time = 1
Innodb_flush_log_at_trx_commit = 2
Innodb_buffer_pool_size = 1024 M
# Innodb_locks_unsafe_for_binlog = 1
If it is not an upgrade, it is a new installation. You also need to set the root password, delete the default empty user, empty password, and so on. Please refer to other blog posts or official manuals of this blog, or google.
For more information about my. cnf configuration, see: