SPRITEKING

mysql ERROR 1040 (00000): Too many connections 报错解决方案

时间:公元14-05-16 栏目:Linux, 数据库 作者:SPRITEKING 吐槽:0 被黑客围观: 2,178 次





mysql
 
[root@spriteking ~]# mysql -u root -p
Enter password:
ERROR 1040 (00000): Too many connections
[root@spriteking ~]# vi /etc/my.cnf
max_connections=1000
max_user_connections=300
 
[root@spriteking ~]# service mysqld stop
Shutting down MySQL....                                    [确定]
[root@spriteking ~]# service mysqld start
Starting MySQL.                                            [确定]
[root@spriteking ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.55-log Source distributionCopyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

 

select

 

重启Mysql :: mysql restart
错误信息:mysql ERROR 1040 (00000): Too many connections

当出现问题的时候,避免出现异常情况,先重启下Mysql服务
[root@spriteking ~]# service mysqld restart

[root@spriteking ~]# mysql -u root -p
mysql> select @@global.max_connections;
+--------------------------------------+
|  @@global.max_connections   |
+--------------------------------------+
|                                         150   |
+--------------------------------------+

// 也就是说现在的最大连接数是 150,我们把他修改为500,。

mysql> set global max_connections=500;
Query OK, 0 rows affected (0.00 sec)

 

声明: 本文由( SPRITEKING )原创编译,转载请保留链接: mysql ERROR 1040 (00000): Too many connections 报错解决方案

mysql ERROR 1040 (00000): Too many connections 报错解决方案:等您坐沙发呢!

发表评论


Time

新浪微博

音乐

为您推荐