Windows下MySQL的配置文件是_[Mysql]mysqlwindows下配置文件

环境是win7 mysql5.6版本

测试下配置文件是否可用(之前没用过windows下的msyql配置)

修改配置前查询下:

mysql> show variables like '%max_connections%';

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

| Variable_name | Value |

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

| max_connections | 100 |

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

1 row in set

修改配置文件 [mysqld] max_connections=50

重新启动mysql,如果net 命令可以用 net stop mysql net start mysql 就可以了,我这里不能用,就直接重启服务了。

重启后查看

mysql> show variables like '%max_connections%';

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

| Variable_name | Value |

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

| max_connections | 100 |

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

1 row in set

好像没有成功,网上还有说放在c:WINDOWS下,测试还没成功,还是直接看下官网的配置吧,百度下果然不太行。

On Windows, MySQL Installer interacts with the user and creates a file named my.ini in the base installation directory as the default option file. If you install on Windows from a Zip archive, you can copy the my-default.ini template file in the base installation directory to my.ini and use the latter as the default option file.

从这段说明来看是放在安装目录下啊。。到底怎么回事呢 然后我又去查看了msyql相关的所有目录,看到有个mysqldata目录,里面有个my.ini 然后我修改了里面connections的值为50 ,结果生效了。

看来还是要好好阅读官方文档才是,不同的安装方式不同的版本会有些差异,不能照抄别人解决方法啊。

‘总结下,一共有这几个位置 c:WINDOWS

安装目录下 data目录下

data目录查找方法

mysql> show variables like '%datadir%';

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

| Variable_name | Value |

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

| datadir | D:devsoftsmysqldatadata |

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

1 row in set

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值