snippetsqlMinor
How can I check the path of my.ini, through the command line?
Viewed 0 times
canthepathlinethroughhowcommandcheckini
Problem
I would like to know, if possible, how to display (using the command line) the path to
I am using MySQL 5.6 inside a windows IIS.
I have the following:
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:
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:
BUT,
if we click over it with the mouse's right button and choose Select All, this is what we have:
So that replies my question.
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-fileBUT,
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" MySQL56So that replies my question.
Solution
mysqld.exe does not report the location of the my.ini it is using. I learned over the years that the my.ini file is supposed to be in the parent folder of the data and bin directories:Feb 06, 2012: MySQL Database and Table Loss
Jan 14, 2014: MySql InnoDB tables are missing after restarting (SeeINVESTIGATION #2)
What can you do form the command line ?
From the command line, run this
C:\> mysqld --help --verbose > C:\mysqld_options.txt
notepad C:\mysqld_options.txtGo look for the line that says
Default options are read from the following files in the given order:The line underneath will tell you the places where mysqld looks for
my.iniIf you don't see one, then use the parent folder of the data and bin directory to make one.
Give it a Try !!!
Code Snippets
C:\> mysqld --help --verbose > C:\mysqld_options.txt
notepad C:\mysqld_options.txtDefault options are read from the following files in the given order:Context
StackExchange Database Administrators Q#133672, answer score: 7
Revisions (0)
No revisions yet.