MySQL my.ini location

前端 未结 14 2294
梦如初夏
梦如初夏 2020-11-27 12:17

I have already seen http://dev.mysql.com/doc/refman/4.1/en/mysql-config-wizard-file-location.html

how to know mysql my.cnf location

and

http://dev.

14条回答
  •  Happy的楠姐
    2020-11-27 12:59

    my.ini LOCATION ON WINDOWS MYSQL 5.6 MSI (USING THE INSTALL WIZARD)

    Open a Windows command shell and type: echo %PROGRAMDATA%. On Windows Vista this results in: C:\ProgramData.

    According to http://dev.mysql.com/doc/refman/5.6/en/option-files.html, the first location MySQL will look under is in %PROGRAMDATA%\MySQL\MySQL Server 5.6\my.ini. In your Windows shell if you do ls "%PROGRAMDATA%\MySQL\MySQL Server 5.6\my.ini", you will see that the file is there.

    Unlike most suggestions you will find in Stackoverflow and around the web, putting the file in C:\Program Files\MySQL\MySQL Server 5.6\my.ini WILL NOT WORK. Neither will C:\Program Files (x86)\MySQL\MySQL Server 5.1. The reason being quoted on the MySQL link posted above:

    On Windows, MySQL programs read startup options from the following files, in the specified order (top items are used first).

    The 5.6 MSI installer does create a my.ini in the highest priority location, meaning no other file will ever be found/used, except for the one created by the installer.

    The solution accepted above will not work for 5.6 MSI-based installs.

提交回复
热议问题