Where is MySQL's my.ini located on Windows?

database, my.ini, mysql, mysql-5.5, windows

Solution

You have to look I the folder `C:\Program Files\MySQL\MySQL Server 5.5` but there is a problem. When you perform an MSI install of MySQL, my.ini is not created. There will be sample .ini files in that folder. In order to use one of them, say `my-medium.ini`, you need to do the following before a MySQL restart:

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 by `C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe`.

Problem

I have already seen http://dev.mysql.com/doc/refman/4.1/en/mysql-config-wizard-file-location.html How do I find the MySQL my.cnf location and http://dev.mysql.com/doc/refman/5.1/en/option-files.html But I am still stuck with the ages 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 am able to use the mysql server using sqlyog. But unfortunately I am not able to find `my.ini` in `installation directory` or not in `c:\` neither in `c:\windows` nor in `data_dir` query `show variables like "mysql_home"` returned nothing as well. Any suggestions?

Original source

Related problems