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