[[email protected] ~]# mysql -S /var/lib/mysql/mysql.sock ERROR 1040 (HY000): Too many connections
使用gdb命令对mysql的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.sock Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server 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 its affiliates. Other names may be trademarks of their respective owners. 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>
时间: 2024-10-11 23:25:04