[BUG] Unable to stop MySQL daemon

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

[BUG] Unable to stop MySQL daemon

Postby spookybathtub » 20. May 2019 00:28

Using XAMPP 5.6.40 on Mojave, the mysql.server stop command fails, and consequently the Stop button in the manager GUI also fails. This is particularly annoying because this script deletes the pid file, so the manager GUI now shows its status as Stopped.

The problem is on line 191 of mysql.server:
Code: Select all
su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1

It can be fixed like this:
Code: Select all
sudo -u $user kill $* > /dev/null 2>&1

I believe this affected older versions of macOS too, because I have had to use Activity Monitor to kill mysql for as long as I can remember. If anyone can explain why the su command fails, I am curious to learn. I guess there is some restriction where it only allows "real users". For example, user maggie shows exit status 0, while the _mysql user shows exit status 1.
Code: Select all
sh-3.2# su - maggie -c "date"; echo $?
Sun May 19 16:30:04 PDT 2019
sh-3.2# su - mysql -c "date"; echo $?
Posts: 19
Joined: 02. June 2013 04:19
XAMPP version: 5.6.33
Operating System: 10.13.4

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 7 guests