视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
[Mysql]mysqlwindows下配置文件_MySQL
2020-11-09 19:48:19 责编:小采
文档


环境是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:\devsofts\mysqldata\data\ |
+---------------+-----------------------------+
1 row in set

下载本文
显示全文
专题