MySQL location my.ini

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

how to find mysql my.cnf location

and

http://dev.mysql.com/doc/refman/5.1/en/option-files.html

But I'm still stuck with an old question! "Where is my my.ini" I am using Windows Server 2008 with mysql 5.5.28. I installed the service using mysqld --install and I can use the mysql server using sqlyog. But, unfortunately, I cannot find my.ini in the installation directory or in c:\ neither in c:\windows nor in the data_dir show variables like "mysql_home" either returned anything.

Any suggestions?

+78
windows mysql
Jan 30 '13 at 6:20
source share
9 answers

You should look at the folder I C:\Program Files\MySQL\MySQL Server 5.5 , but there is a problem. When you perform the MySQL MSI installation, my.ini is not created. There will be samples of .ini files in this folder. To use one of them, say my-medium.ini , before rebooting MySQL you need to do the following:

 cd C:\Program Files\MySQL\MySQL Server 5.5 copy my-medium.ini my.ini net stop mysql net start mysql 

Once you do this, my.ini can be read C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe .

+28
Jan 30 '13 at 6:51
source share

my.ini LOCATION ON WINDOWS MYSQL 5.6 MSI (USING DEVICE DEVICE)

Open a Windows 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 MySQL location will look like %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 there is a file.

Unlike most offers that you will find on Stackoverflow and on the Internet, placing a file in C:\Program Files\MySQL\MySQL Server 5.6\my.ini DOES NOT WORK. Also there will be no C:\Program Files (x86)\MySQL\MySQL Server 5.1 . Reason for quoting the MySQL link posted above:

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

The installer 5.6 MSI makes the creation of my.ini at the highest priority location, that is, no other file will be found / used except the one that was created by the installer.

The decision made above will not work on 5.6 MSI-based installations.

+162
Dec 01 '13 at
source share
  • Type "services.msc" in the search box on the Start menu.
  • Locate the MySQL service in the Name column, for example MySQL56.
  • Right-click the MySQL service and select Properties.
  • Look for the "path to the executable file" in the "General" tab, and there is your .ini file, for example, "C: \ Program Files (x86) \ MySQL \ MySQL Server 5.6 \ bin \ mysqld.exe" --defaults -file = " C: \ ProgramData \ MySQL \ MySQL Server 5.6 \ my.ini "MYSQL56
+90
Feb 23 '15 at 22:35
source share

Launch MySQL Workbench, then Server → File Options and look at the bottom of the window; he will say something like "Configuration file: C: \ ProgramData \ MySQL \ MySQL Server 5.6 \ my.ini"

(And note the subtle difference between "ProgramData" and "Program Files" - it's easy to mask if you're looking for a quick answer.)

+23
02 Sep '14 at 15:29
source share

Answered only for MySQL Workbench users,

enter image description here

+9
Jul 03 '17 at 11:27
source share

You can find the my.ini file in the windows in this place - C: \ ProgramData \ MySQL \ MySQL Server 5.6

The ProgramData folder is a hidden folder, so set it accordingly to see this folder. And open my.ini file as administrator for editing, and then save it.

+8
Aug 28 '15 at 9:12
source share

In my case, the ProgramData folder was hidden by default in Windows 7, so I could not find the my.ini file.

After choosing the option to display hidden files and folders, I managed to find the my.ini file at: C:\ProgramData\MySQL\MySQL Server 5.6 .

Show hidden files and folders on windows 7:

  • Right-click on the Windows logo icon and select "Open Windows Explorer."

  • Click Organize and select Folder and Search Options.

  • Go to the "View" tab, select "Show hidden files and folders", and then uncheck "Hide protected system files."

  • Click "Yes" in the warning and then click "OK."

+4
Feb 06 '17 at 14:38
source share

it is located in the folder C: \ Program Files \ MySQL \ MySQL Server 5.5. There are various .ini files with small, medium, and large names. usually used environment or depends on your requirement.

+2
Jan 30 '13 at 6:28
source share

I encountered the same problem when I installed MSI to install MySQL and there were no my-medium.ini files when I tried to complete the above steps. Only the installation of the MySQL ZIP file helped me. Therefore, I suggest that you remove the installed MSI folder and reinstall it using a ZIP file.

0
Jan 22 '17 at 4:58 on
source share



All Articles