[Mysql]mysql under Windows configuration file

Source: Internet
Author: User
Tags net command

Environment is Win7 mysql5.6 version


Test whether the configuration file is available (not previously msyql configured under Windows)

To modify the pre-configuration query:
Mysql> Show variables like '%max_connections% '; +-----------------+-------+| Variable_name   | Value |+-----------------+-------+| max_connections |   |+-----------------+-------+1 row in Set

Modifying a configuration file [mysqld]max_connections=50
Restart MySQL, if the net command can be used net stop mysqlnet start MySQL, I can not use here, and then directly restart the service.
View after reboot
Mysql> Show variables like '%max_connections% '; +-----------------+-------+| Variable_name   | Value |+-----------------+-------+| max_connections |   |+-----------------+-------+1 row in Set

There seems to be no success,and on the Internet.C:\WINDOWS under, the test has not been successful, or directly look at the configuration of the Xia Guan Network, Baidu is not very good indeed.
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 Direc Tory to My.ini and use the latter as the default option file.

From this point of view is placed in the installation directory AH. What the hell is going on? Then I went to see all the MSYQL related directories, see there is a mysqldata directory, there is a my.ini and then I modified the inside connections value of 50, the result is in effect.
It seems to be good to read the official document is, different installation methods of different versions will be some differences, can not copy other people's solution ah.
' In summary, there are a number of these positions C:\WINDOWS
Under the data directory in the installation directory
Data Directory Lookup method
</pre><pre name= "code" class= "Python" >mysql> show variables like '%datadir% '; +---------------+------- ----------------------+| variable_name | Value                       |+---------------+-----------------------------+| datadir       | D:\devsofts\mysqldata\data\ |+---------------+-----------------------------+1 row in Set

This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/41681927

Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way


[Mysql]mysql under Windows configuration file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.