Page 1 of 1

wrong mysql config path

PostPosted: 04. October 2017 16:26
by two_socks
Hi,
I'm using Xampp 7.1.9 on Windows 7 and when I run the follow comand:
Code: Select all
mysql --help

and I look at the output I should have the mysql my.ini path.
My result is:
Code: Select all
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\data\my.ini C:\xampp\mysql\data\my.cnf

but the path is wrong because instead of "mysql\data" the config file is located in "mysql\bin"

Do you have any idea why Mysql gives me back the wrong path?

Re: wrong mysql config path

PostPosted: 08. October 2017 00:36
by two_socks
Up
Nobody has any idea why the path is wrong?

Re: wrong mysql config path

PostPosted: 08. October 2017 09:46
by Nobbie
Simply a bug in the documentation?!

Re: wrong mysql config path

PostPosted: 08. October 2017 13:39
by two_socks
I don't think so, the output comes directly from the mysql command
It looks like mysql searches the my.ini file in one of those paths, but the config button in the Xampp control panel points to a different file.
I suppose mysql starts without reading any ini file and xampp edits a file not used at all.

Re: wrong mysql config path

PostPosted: 08. October 2017 17:30
by Altrea
Hi,

two_socks wrote:I suppose mysql starts without reading any ini file and xampp edits a file not used at all.

That is just wrong. MySQL in XAMPP does not get started without any command line parameters. The full start command looks somethin g like this:
Code: Select all
"c:\xampp\mysql\bin\mysqld.exe" --defaults-file="c:\xampp\mysql\bin\my.ini" --standalone --console

As you can see the config file is submitted as command line parameter in the startup command.

Instead using the default Windows command line you should use the XAMPP shell (Button in your XAMPP control panel. This shell adds some XAMPP specific configurations and paths so you get the correct outputs.

best wishes,
Altrea

Re: wrong mysql config path

PostPosted: 09. October 2017 17:06
by two_socks
Altrea wrote:Instead using the default Windows command line you should use the XAMPP shell (Button in your XAMPP control panel. This shell adds some XAMPP specific configurations and paths so you get the correct outputs.

No absolutely, I always use the Xampp control panel to run Apache and Mysql servers.
I only use the command line if I need to log-in remotely to another instance of Mysql by the terminal.

Code: Select all
"c:\xampp\mysql\bin\mysqld.exe" --defaults-file="c:\xampp\mysql\bin\my.ini" --standalone --console

If this is the mysqld execution command, it explains why the config file is located inside the bin directory.

Thanks

Re: wrong mysql config path

PostPosted: 09. October 2017 17:15
by Altrea
two_socks wrote:No absolutely, I always use the Xampp control panel to run Apache and Mysql servers.
I only use the command line if I need to log-in remotely to another instance of Mysql by the terminal.

You did not use the XAMPP shell (which can get opened from the control panel) to send the mysql --help command. The output if differend o
if you use the default windows command line or the xampp shell. That is what i wanted to say.

Re: wrong mysql config path

PostPosted: 09. October 2017 22:22
by two_socks
Altrea wrote:You did not use the XAMPP shell (which can get opened from the control panel) to send the mysql --help command. The output if differend o
if you use the default windows command line or the xampp shell. That is what i wanted to say.

Ahh... ok, I understand now.

Thanks Altrea