Bug #83440 macOS Sierra bug can´t stop mysql server process
Submitted: 19 Oct 2016 9:43 Modified: 19 Oct 2016 17:33
Reporter: Jose Pose Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Errors Severity:S5 (Performance)
Version:5.7.17 OS:MacOS (unknown)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[19 Oct 2016 9:43] Jose Pose
----[For better reports, please attach the log file after submitting. You can find it in /Users/jose/Library/Application Support/MySQL/Workbench/log/wb.log]

Mac not shutdown inmediatly because can´t close MySQL process in macOS Sierra.

If you disable mysql start when start Mac and you not start mysql server its fine, but if you start mysql server and try shutdown Mac or reboot you spend over 10 min and you can´t do nothing.

If you go to System preferences and try to stop mysql server block S.O. and not really stoped.

How to repeat:
Start mysql server and try shutdown or reboot every time when mysql server is on.
[19 Oct 2016 12:02] MySQL Verification Team
Stop and re-start

Attachment: stop-start.png (image/png, text), 747.50 KiB.

[19 Oct 2016 12:05] MySQL Verification Team
Thank you for the bug report. I couldn't repeat please see prior attached picture.
[19 Oct 2016 12:13] MySQL Verification Team
If I do a machine shutdown without to stop the server with:

sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

actually the machine shutdown hangs otherwise if I stop the server before the machine shutdown is fast. So the workaround is to stop the server like showed above.
[19 Oct 2016 17:33] Jose Pose
I see this in Apple Forum this is the same case:

If you start Mac with mysql stoped the next shutdown its fine.
If you try stop in System Preferences MySQL do not respond process.
If you try stop with terminal i think its fine.
[20 Oct 2016 9:28] Daniel Fischer
I see that this bug was originally reported against MySQL 5.7.13 and later updated to 5.7.17.

MySQL 5.7.15 fixed a bug (not publicly visible) that caused mysqld to always hang on exit on macOS 10.12. Please make sure you're using MySQL 5.7.15 or newer. 

If the hang still exists in 5.7.15+ but shutting down MySQL via launchctl prevents it, this must be a different issue.