mysql 5.6 maxconnections_mysql-5.6.13中max_connections配置不生效的问题?

本帖最后由 vcdog 于 2014-3-7 11:26 编辑

1.max_connections默认值为2000:(数据库版本为:5.6.13)

在/etc/my.cnf下,添加max_connections=10000,重启数据库,查看日志报警如下:

2014-03-05 16:13:51 3299 [Warning] Buffered warning: Using unique option prefix max-connection instead of max_connections is deprecated and will be removed in a future release. Please use the full name instead.

查询max_connections如下:

mysql>show variables like '%max_connect%';

+--------------------+-------+

| Variable_name      | Value |

+--------------------+-------+

| max_connect_errors | 6000  |

| max_connections    | 2000  |

+--------------------+-------+

2 rows in set (0.00 sec)

修改/etc/my.cnf为max-connection=10000,重启数据库问题依然存在报警如下:

2014-03-05 16:18:15 4503 [Warning] Buffered warning: Using unique option prefix max-connection instead of max_connections is deprecated and will be removed in a future release. Please use the full name instead.

查询max_connections如下:

mysql>show variables like '%max_connect%';

+--------------------+-------+

| Variable_name      | Value |

+--------------------+-------+

| max_connect_errors | 6000  |

| max_connections    | 2000  |

+--------------------+-------+

2 rows in set (0.00 sec)

目前,只能通过登录数据库后,进行手动操作:

mysql> set global max_connections=10000;

但是,一旦数据库重启,此参数又恢复默认值2000.问题很奇怪,查询官方文档,只有max_connections这一个参数,解释如下:

max_connections [553]

Command-Line Format --max_connections=#

Option-File Format max_connections

System Variable Name max_connections [553]

Variable Scope Global

Dynamic Variable Yes

Permitted Values

Type numeric

Default 151

Range 1 .. 100000

The maximum permitted number of simultaneous client connections. By default, this is 151. See

Section C.5.2.7, “Too many connections”, for more information.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值