[Mysql] mysql windows configuration file, mysql configuration file
The environment is win7 mysql5.6
Test whether the configuration file is available (no msyql configuration in windows has been used before)
Query the configuration before modification:
mysql> show variables like '%max_connections%';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 100 |+-----------------+-------+1 row in set
Modify the configuration file [mysqld] max_connections = 50
Restart mysql. If the net command can use net stop mysqlnet start mysql, and I cannot use it here, I will directly restart the service.
View after restart
mysql> show variables like '%max_connections%';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 100 |+-----------------+-------+1 row in set
It seems that the test was not successful. I still said that the test was not successful under c: \ WINDOWS on the Internet. Check the configuration on the official website. It is really not feasible for Baidu.
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.
From this section, we can see that it is placed in the installation directory .. Then I checked all the directories related to msyql and found a mysqldata directory with my. ini, I modified the connections value to 50, and the result takes effect.
It seems that it is still necessary to read the official documentation. Different installation methods may vary with versions, so you cannot copy other solutions.
'In summary, there are a total of these locations c: \ WINDOWS
Under the data directory under the installation directory
Data Directory Search 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 from the "orangleliu notebook" blog, reprint please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/41681927
Author orangleliu adopts signature-non-commercial use-share protocol in the same way