What is the location of mysql client “.my.cnf” in XAMPP for Windows?

What is the location of mysql client .my.cnf using XAMPP in Windows?

Clarification: This file does not exist by default, so when you create it, where should you place it, in order for the command line client to read it automatically?

Answer

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:Windowsmy.ini C:Windowsmy.cnf C:my.ini C:my.cnf C:xamppmysqlmy.ini C:xamppmysqlmy.cnf C:xamppmysqlbinmy.ini C:xamppmysqlbinmy.cnf

Your setup may differ. You will have to run the command to check the actual paths on your particular system.

Leave a Reply

Your email address will not be published. Required fields are marked *