MySQL not stopping on MacOS (with solution)

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

MySQL not stopping on MacOS (with solution)

Postby edem » 04. March 2019 16:10


I'm using the non-vm version of XAMPP on MacOS (Mojave, 10.14.3) and I noticed that "sudo xampp stop" did not stop the mysql process as it used to, although it did delete the pid file. ("sudo xampp status" did report mysql as not running; "ps ax | grep mysql" however did reveal it was still running.) After spending ages trying to find or track the issue, I have found the bug in "share/mysql/mysql.server" (in the su_kill() function):
Code: Select all
su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1

The version of su coming with MacOS does not support the -s <shell> parameter, thus it did not kill the process; but it did not trigger an error either, so the script went on and deleted the .pid file.
If you're in the same shoes as me, replace the line above with the following:
Code: Select all
sudo -u $user -s /bin/sh -c "kill $*" >/dev/null 2>&1

and Bob's your uncle.
Posts: 1
Joined: 04. March 2019 16:01
XAMPP version: XAMPP for Mac OS X 7.2.15-0
Operating System: MacOS

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 8 guests