欢迎投稿

今日深度:

[Mysql]mysql windows下配置文件,mysql配置文件

[Mysql]mysql windows下配置文件,mysql配置文件


环境是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目录查找方法
</pre><pre name="code" class="python">mysql> show variables like '%datadir%';
+---------------+-----------------------------+
| Variable_name | Value                       |
+---------------+-----------------------------+
| datadir       | D:\devsofts\mysqldata\data\ |
+---------------+-----------------------------+
1 row in set

本文出自 “orangleliu笔记本” 博客,转载请务必保留此出处http://blog.csdn.net/orangleliu/article/details/41681927

作者orangleliu 采用署名-非商业性使用-相同方式共享协议


www.htsjk.Com true http://www.htsjk.com/shujukunews/4927.html NewsArticle [Mysql]mysql windows下配置文件,mysql配置文件 环境是win7 mysql5.6版本 测试下配置文件是否可用(之前没用过windows下的msyql配置) 修改配置前查询下: mysql show variables like %max_connections%;+---...
评论暂时关闭