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

前端 未结 14 2001
迷失自我
迷失自我 2020-11-27 06:21

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

相关标签:
14条回答
  • 2020-11-27 07:04

    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.

    0 讨论(0)
  • 2020-11-27 07:06

    If you're on Cygwin this command will show you the locations:

    mysql --help |grep -A1 Default|grep my
    
    0 讨论(0)
  • 2020-11-27 07:07

    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).

    0 讨论(0)
  • 2020-11-27 07:09

    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.

    0 讨论(0)
  • 2020-11-27 07:09

    You can find it in C:\ProgramData\MySQL\MySQL Server 5.7

    0 讨论(0)
  • 2020-11-27 07:12

    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.

    0 讨论(0)
提交回复
热议问题