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.
I have been using the MySQL 5.1 series with built-in installation and the innodb Storage engine. I have found that 5.1 does not support the innodb Engine very well, and many concurrent connections to the database may cause 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 // -- enablerepo = webtatic specifies to use the yum source we downloaded in step 1 to download and install
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 .........