Troubleshooting for Mysql "Too many connections"

Source: Internet
Author: User

[Email protected] ~]# mysql-s/var/lib/mysql/mysql.sockerror 1040 (HY000): Too Many connections

Use the GDB command to make changes to MySQL's max_connections:

[[email protected] ~]# gdb -p $ (cat /var/ Run/mysqld/mysqld.pid)  -ex  "set max_connections=500"  -batch[new lwp 25797][new  lwp 25794][new lwp 25793][new lwp 25792][new lwp 25791][new lwp  25790][New LWP 25789][New LWP 25788][New LWP 25787][New LWP  25786][new lwp 25785][new lwp 25783][new lwp 25782][new lwp 25781][new  lwp 25780][new lwp 25779][new lwp 25778][new lwp 25777][new lwp  25776][new lwp 25775][new lwp 25774][thread debugging using libthread _db enabled]using host libthread_db library  "/lib64/libthread_db.so.1". 0x00007f2e646f1b7d in poll  ()  from /lib64/libc.so.6 
[[email protected] ~]# mysql -s /var/lib/mysql/mysql.sockenter password:  Welcome to the mysql monitor.  commands end with ; or \ g.your mysql connection id is 4server version: 5.6.30 mysql  community server  (GPL) copyright  (c)  2000, 2016, oracle and/or its  affiliates. all rights reserved. oracle is a registered trademark of oracle corporation and/or  Itsaffiliates. other names may be trademarks of their respectiveowners . type  ' help; '  or  ' \h '  for help. Type  ' \c '  to clear the current input  statement.mysql> show variables like  ' max_connections '; +-----------------+------- +| variable_name   | value |+-----------------+-------+| max_connections |  500  |+-----------------+-------+1  row in set  (0.00 sec) mysql>

This article from "candon123" blog, declined reprint!

Troubleshooting for Mysql "Too many connections"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.