• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

[Mysql]mysqlwindows下配置文件_MySQL

mysql 搞代码 4年前 (2022-01-09) 50次浏览 已收录 0个评论

环境是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.

从这段说明来看是放在安装目录下啊。。到底怎么回事呢 然后我又去查看了msy

本文来源gaodai.ma#com搞##代!^码网(

ql相关的所有目录,看到有个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

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[Mysql]mysqlwindows下配置文件_MySQL
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址