环境是win7 mysql5.6版本
测试下配置文件是否可用(之前没用过windows下的msyql配置)
一款非常包包、衣服、鞋子类网站,页面干净清洁、一目了然,mttshop打造精致、简单、易用、免费的商城。 系统要求:IIS5.1以后,必须安装.net 3.5 安装步骤: 1、下载完成后,直接解压文件mttshop.rar 2、附加数据库:解压后的可以找一个叫db的文件夹,解压后直接附加就可以,支持SQL 2000、2005、2008 3、配置web.config文件,找到key=&qu
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:\devsofts\mysqldata\data\ | +---------------+-----------------------------+ 1 row in set









