Bug #109782 mysql@5.7 cannot start on m2 Mac

Submitted: 26 Jan 2023 1:35 Modified: 28 Jan 2023 13:06
Reporter: Zhihong Yu Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version: OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[26 Jan 2023 1:35] Zhihong Yu
Description:
After installing mysql@5.7 on m2 Mac, I cannot start the service (even with sudo).

Here is the OS:

Darwin Zhihongs-MBP-2.attlocal.net 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan  5 20:50:36 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6020 arm64

The following snippet repeats in /opt/homebrew/var/mysql/Zhihongs-MBP-2.attlocal.net.err since the service tries to start repeatedly:

2023-01-26T01:23:03.441609Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2023-01-26T01:23:03.441632Z 0 [Note] /opt/homebrew/opt/mysql@5.7/bin/mysqld (mysqld 5.7.41) starting as process 97005 ...
2023-01-26T01:23:03.442631Z 0 [Warning] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2023-01-26T01:23:03.442644Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2023-01-26T01:23:03.442655Z 0 [ERROR] Aborting

2023-01-26T01:23:03.442661Z 0 [Note] Binlog end
2023-01-26T01:23:03.442678Z 0 [Note] /opt/homebrew/opt/mysql@5.7/bin/mysqld: Shutdown complete

How to repeat:
install mysql rel 8 on m2 Mac using brew
uninstall mysql rel 8
install mysql@5.7
try to start with `sudo brew services start mysql@5.7` but mysql doesn't start

brew services info mysql@5.7
mysql@5.7 (homebrew.mxcl.mysql@5.7)
Running: ✘
Loaded: ✔
Schedulable: ✘
[27 Jan 2023 12:28] MySQL Verification Team
Hi,

If you look at the list of supported platforms

https://www.mysql.com/support/supportedplatforms/database.html

You will notice that neither M1 nor M2 are officially supported platforms.

With regards to your issue, it is issue with BREW, if you look at your log:

> 2023-01-26T01:23:03.442644Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
> 2023-01-26T01:23:03.442655Z 0 [ERROR] Aborting

MySQL server is failing to start as you are trying to start it as a root. This is weird as you should not even start BREW as a root but as a regular user. I suggest you check with BREW community what you are doing wrong or if the recipe needs to be changed.
[28 Jan 2023 13:06] Zhihong Yu
I managed to start mysql@5.7 on my mac.

This can be closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.