How to modify MySQL5.6 configuration file (my. ini) in Windows _ MySQL

Source: Internet
Author: User
How to modify the configuration file (my. ini) of MySQL5.6 in Windows: bitsCN.com

How to modify the configuration file (my. ini) of MySQL 5.6 in Windows

This is also a small experience. As required by the experiment, I need to modify the MySQL configuration file my. ini. Before MySQL 5.6.8, the configuration file is directly placed in the installation directory. In a later version, MySQL searches for the my. ini file in the following order during startup:

File Name  Purpose%PROGRAMDATA%/MySQL/MySQL Server 5.6/my.ini, %PROGRAMDATA%/MySQL/MySQL Server 5.6/my.cnf  Global options%WINDIR%/my.ini, %WINDIR%/my.cnf  Global optionsC:/my.ini, C:/my.cnf  Global optionsINSTALLDIR/my.ini, INSTALLDIR/my.cnf  Global optionsdefaults-extra-file  The file specified with --defaults-extra-file=path, if any%APPDATA%/MySQL/.mylogin.cnf 

However, when I tried to do this today, I encountered an unpleasant problem. When I first did not see the official documentation, I searched several websites in English and Chinese. the INI file is located in the C:/ProgramData/MySQL Server 5.6 Directory. after reading it, I did not find this directory, so I created a new one. I restarted the MySQL service many times and never found that the configuration worked.

When I was puzzled, I accidentally saw the shortcut configuration of MySQL Command Line MySQL 5.6 Command Line Client. the target column says "D: /Program Files/MySQL Server 5.6/bin/mysql.exe "" -- defaults-file = D:/ProgramData/MySQL Server 5.6/my. ini ""-uroot ""-p "suddenly realized that there was an identical folder under drive D (because I installed MySQL to drive D), according to the above table, my. ini is the first to load.

I need to modify the maximum number of connections of MySQL. for example, here I change it to 50 and change it in my. ini:

[plain] max_connections=50  

Restart the MySQL service and enter the following in the MySQL command line:

[plain] show variables like '%max_connections%';  

The maximum number of connections is changed to 50.

BitsCN.com

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.