What is the location of mysql client .my.cnf
using XAMPP in Windows?
Clarification: This file does not exist by default, so when you cr
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.
If you're on Cygwin this command will show you the locations:
mysql --help |grep -A1 Default|grep my
Go to control panel → services, look for MySQL and right click choose properties. If there, in “path to EXE file”, there is a parameter like
--defaults-file="X:\path\to\my.ini"
this is the file the server actually uses (independent of what mysql --help
prints).
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.
You can find it in C:\ProgramData\MySQL\MySQL Server 5.7
Apologize for resurrect this thread, but for Windows 8.x users can find my.cnf at this folder:
C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
Then also can find data folder on same folder.