mysql连接限制

    1. c3p0在运行一段时间后总是抛出错误:“Thread unexpectedly interrupted while performing an acquisition attempt”,查看log,发现“Data source rejected establishment of connection,  message from server: "Too many connections"”,证明mysql存在max_connections来限制外部程序对其访问的连接

    2. vi /etc/my.ini
#max_connections=100
max_connections=1000


    3. sudo /sbin/service mysqld restart

猜你喜欢

转载自42087743.iteye.com/blog/1397797