MySQL:my.cnf中的修改未生效 [英] Mysql: modification in my.cnf doesn't take effect

查看:471
本文介绍了MySQL:my.cnf中的修改未生效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用以下行更新了数据库的my.cnf文件:max_connections=200.之后,我停止并启动了mysql服务,以使更改生效.

I've updated the my.cnf file of my database with the following line: max_connections=200. I stopped and started the mysql service after that so that the changes would take effect.

但是由于某种原因,此更改不会影响数据库,因为如果我运行:

But for some reason this change doesn't affect the database because if I run:

mysql> select @@max_connections

它显示最大连接数为100.

it shows that the max number of connections is 100.

很显然,还有其他地方可以管理此值.我在哪里可以找到它或我做错了什么?

Obviously there is some place else that manages this value. Where can I find it or what did I do wrong?

谢谢您的答复.

推荐答案

确保在[mysqld]部分下的max_connections:

Make sure the max_connections in under the [mysqld] section:

例如:

[mysqld]
socket=/path/to/mysql.sock
datadir=/var/lib/mysql
max_connections=200

[client]
#mysql-client settings here..

这篇关于MySQL:my.cnf中的修改未生效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆