What is the location of mysql client ".my.cnf" in XAMPP for Windows?
Type this:
mysql --help
Then look at the output. There is a block of text about 3/4 the way down describing what files it finds its defaults .my.cnf
from. Here is an example from XAMPP v3.2.1:
Default options are read from the following files in the given order:C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\xampp\mysql\my.ini C:\xampp\mysql\my.cnf C:\xampp\mysql\bin\my.ini C:\xampp\mysql\bin\my.cnf
Your setup may differ. You will have to run the command to check the actual paths on your particular system.
Look in the MySQL config file C:\xampp\mysql\bin\my.ini
.
At the top of that file are some comments:
# You can copy this file to# C:/xampp/mysql/bin/my.cnf to set global options,# mysql-data-dir/my.cnf to set server-specific options (in this# installation this directory is C:/xampp/mysql/data) or# ~/.my.cnf to set user-specific options.
There it tells you where to find your .my.cnf
file.
After checking the default locations on Win7 with mysql --help
and unable to find any config file, I manually searched for my.ini and found it at C:\ProgramData\MySQL\MySQL Server x.y
(yep, ProgramData
, not Program Files
).
Though I used an own my.ini at Program Files
, the other configuration overwrote my settings.