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

前端 未结 14 2233
迷失自我
迷失自我 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:01

    On Windows you can open a command window and type the command

    sc qc mysql
    

    Or:

    sc qc mariadb
    

    which (depending on your flavor and version) will output something like:

    [SC] QueryServiceConfig SUCCESS
    
    SERVICE_NAME: mariadb
            TYPE               : 10  WIN32_OWN_PROCESS 
            START_TYPE         : 2   AUTO_START
            ERROR_CONTROL      : 1   NORMAL
            BINARY_PATH_NAME   : "C:\Program Files\MariaDB 10.4\bin\mysqld.exe" "--defaults-file=C:\Program Files\MariaDB 10.4\data\my.ini" "MariaDB"
            LOAD_ORDER_GROUP   : 
            TAG                : 0
            DISPLAY_NAME       : MariaDB
            DEPENDENCIES       : 
            SERVICE_START_NAME : NT AUTHORITY\NetworkService
    

    From this you can see the location of the my.ini file.

    You can also change it with the same "sc" command like this:

    sc config mysql binPath= 
    

    Or:

    sc config mariadb binPath= 
    

    For example:

    sc config mariadb binpath= "\"C:\Program Files\MariaDB 10.4\bin\mysqld.exe\" \"--defaults-file=M:\data\my.ini\" \"MariaDB\""
    

提交回复
热议问题