Mysql Optimization of DirectAdmin

Source: Internet
Author: User
The default Mysql configuration of DirectAdmin is insufficient for large-volume virtual host servers, which brings great load to the system. On the Internet, I have referenced some MYSQL-related optimization parameters suitable for DA, I would like to share with you that each IDC should be modified based on the situation of its own customers and servers. This configuration is suitable for Mysql 5.0 and 5.1 In Directadmin. 1. DA mysql configuration file path vim

The default Mysql configuration of DirectAdmin is insufficient for large-volume virtual host servers, which brings great load to the system. On the Internet, I have referenced some MYSQL-related optimization parameters suitable for DA, I would like to share with you that each IDC should be modified based on the situation of its own customers and servers.

This configuration is suitable for Mysql 5.0 and 5.1 In Directadmin.

 


I. DA's mysql configuration file path
vim /etc/my.cnf

Ii. default file content
[mysqld]local-infile=0

Iii. Content for Reference
[Mysqld] local-infile = 0skip-lockingbind-address = 127.0.0.1 # Only local access is allowed, and external IP access is not allowed (to prevent customers from reselling MYSQL) connections = 1max_connections = 500 # maximum number of MYSQL connections interactive_timeout = 100wait_timeout = 100connect_timeout = timeout = 128key_buffer = timeout = 16Mtable_cache = 1024record_buffer = 1 M # Copyright by kwx. gdsort_buffer_size = 2Mread_buffer_size = bytes = 10thread_concurrency = 2 # Number of CPU Cores Used handler = 64Mserver-id = 1 [safe_mysqld] err-log =/var/log/mysqld. protocol = 8192 [mysqldump] Protocol = 16 M [mysql] no-auto-rehash [isamchk] key_buffer = protocol = 64Mread_buffer = 16Mwrite_buffer = 16 M [Protocol] key_buffer = 64Msort_buffer = 64Mread_buffer = 16Mwrite_buffer = 16 M [mysqlhotcopy] interactive-timeout

4. Restart MYSQL to make it take effect
/sbin/service mysqld restart
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.