When I am developing in Linux, I insert handred data into MySql by tens Java Thread.
I alway got the warning connection refuse , too many connection. I found the max connection in mysql is 100.
I have check it as Mysql root
mysql> show variables;
| max_connections | 100 |
So, Change the my.cnf(Linux) or my.ini(Windows)
Make sure below the [mysqld]:
max_connections= 10000
And restart the Mysql.
check it again.: mysql> show variables;
| max_connections | 10000 |
if you add the max_connections= 10000 to other line, it would not works.
more questions, add my QQ:279938293, or email me :cafecheng@163.com