How can I check the path of my.ini, through the command line?
5
votes
1
answer
24772
views
I would like to know, if possible, how to display (using the command line) the path to
my.ini
used by the server.
I am using MySQL 5.6 inside a windows IIS.
I have the following:
- Program Files\MySQL\MySQL Server 5.6\my-default.ini
- C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
.
For sure, the server is using the second one. Is the path stored in any variable inside mysql server variables?
I was checking some system variables but I couldn't find it.
Any ideas?
-------------------------------------------------------------------------------
UPDATE
After Ronaldo's post I ran a --help and this is what I found:
...
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:\Program Files\MySQL\MySQL Server 5.6\my.ini
C:\Program Files\MySQL\MySQL Server 5.6\my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
...
The strange thing is that I don't have none of these files. I sit to display hided files on each folder.
So, I took a look to this post and I followed the steps.
Finally I arrived at the window **MySQL56 Properties(Local Computer)**.
I could read:
Path to executable:
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file
BUT,
if we click over it with the mouse's right button and choose Select All, this is what we have:
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe"
--defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56
So that replies my question.
Asked by IgorAlves
(337 rep)
Mar 29, 2016, 01:42 PM
Last activity: Apr 22, 2021, 07:20 PM
Last activity: Apr 22, 2021, 07:20 PM