[Mysql]mysql windows下設定檔,mysql設定檔

來源:互聯網
上載者:User

[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 mysqlnet 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 採用署名-非商業性使用-相同方式共用協議


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.