CentOS 6. x use yum to quickly install MySQL 5.5

Source: Internet
Author: User

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 .........

Related Article

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.