出现mysql max-connections问题解决
来源:互联网 发布:知天下资源吧进不去 编辑:程序博客网 时间:2024/04/30 14:36
mysql -p
show variables;
或者
mysql -uroot -p variables |grep max_connections
显示当前运行的Query:mysql> show processlist;
显示当前状态:mysql> show status;
修改MYSQL最大连接数的3种方法:
1. mysql>set GLOBAL max_connections=1000
2.修改 /usr/bin/mysqld_safe
vi /usr/bin/mysqld_safe
找到safe_mysqld编辑它,找到mysqld启动的那两行,:set number ,在386和388行,在后面加上参数 :
-O max_connections=1500
具体一点就是下面的位置:
then $NOHUP_NICENESS $ledir/$MYSQLD
$defaults --basedir=$MY_BASEDIR_VERSION
--datadir=$DATADIR $USER_OPTION
--pid-file=$pid_file
--skip-external-locking ///////////////////////////////////////
-O max_connections=1500
>> $err_log 2>&1 else
eval "$NOHUP_NICENESS $ledir/$MYSQLD
$defaults --basedir=$MY_BASEDIR_VERSION
--datadir=$DATADIR $USER_OPTION
--pid-file=$pid_file
--skip-external-locking $args
-O max_connections=1500 >> ////////////////////////////////////////
$err_log 2>&1"
保存。
3.mysql 手工编译
解开MySQL的原代码,进入里面的sql目录修改mysqld.cc找到下面一行:
{"max_connections", OPT_MAX_CONNECTIONS,
"The number of simultaneous clients allowed.", (gptr*) &max_connections,
(gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,
0},
把它改为:
{"max_connections", OPT_MAX_CONNECTIONS,
"The number of simultaneous clients allowed.", (gptr*) &max_connections,
(gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 1500, 1, 16384, 0, 1,
0},
存盘退出,然后./configure ;make;make install可以获得同样的效果。
- 出现mysql max-connections问题解决
- MySQL 1040 Too many connections 问题解决
- mysql出现Too many connections的解决...
- mysql出现Too many connections的解决...
- MySQL出现too many connections(1040)错误的解决办法
- mysql连接失败或出现“Too many connections”错误
- MySQL出现too many connections(1040)错误的解决办法
- mysql: Too many connections
- mysql Too many connections
- MySQL Connections to sleep
- mysql Too many connections
- mysql "too many connections"
- Mysql too many connections
- MySQL too many connections
- mysql two many connections
- mysql执行update时出现问题解决
- mysql再次安装出现的问题解决方案
- SpringMVC+MySQL出现编码问题解决思路
- 求字符123456每一位数字相加
- 详解指针数组,数组指针,函数指针,以及堆中的分配
- InfoPath设计优化
- 怎样理解as C#的中的作用
- 团购网站 商品倒计时的功能
- 出现mysql max-connections问题解决
- Fedora手记(4)——为Django安装MySQL适配器
- flex_01 java 和 flex 通信
- Individuals and interactions over processes and tools
- qt中文翻译步骤
- MSSQL查询方式(1)
- 两个十进制大数相乘
- C开发总结
- 内存数据库FastDB和SQLite性能测评