1 2 3 4 5 6 7 8 9 10 11 |
<strong>vi /etc/my.cnf</strong> [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks <strong>max_connections=1000</strong> #在此设置最大连接数 默认是没有这一行的 直接添加即可 symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid |
1 2 3 |
<strong>services mysqld restart</strong> <strong>mysqladmin -uroot -ppasswd variables | grep max_connections</strong> | max_connections | 1000 |
2014年1月3日, PM 01:16:42