-
- [mysqld]
- port = 3306
- socket = /tmp/mysql.sock
- skip-locking
- key_buffer = 160M
- max_allowed_packet = 1M
- table_cache = 64
- sort_buffer_size = 512K
- net_buffer_length = 8K
- read_buffer_size = 256K
- read_rnd_buffer_size = 512K
- myisam_sort_buffer_size = 8M
- max_connections=1000
Copy code
Of course, you also need to develop good programming habits and achieve reasonable use and recycling of resources, so that your PHP program will be more efficient. This will reduce the occurrence of errors like too many connections.
|