Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save syahzul/d760e946976022ad6944c8f2e7813750 to your computer and use it in GitHub Desktop.
Save syahzul/d760e946976022ad6944c8f2e7813750 to your computer and use it in GitHub Desktop.
How to Fix MySQL Not Running on macOS Sequoia 15.0

If you've recently upgraded to macOS Sequoia 15.0 and are experiencing issues with MySQL not running, you're not alone. This guide will walk you through the steps to resolve this issue, especially if you're upgrading to MySQL version 9 or above.

You might encounter error messages like this:

ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)

The root cause lies in the significant architectural changes introduced in MySQL 9.0. Upgrading directly from older MySQL versions (pre-8.4) to 9.0 or later often bypasses crucial compatibility steps, leading to startup failures.

Here's the solution, broken down into actionable steps:

Stop MySQL 9.x

Stop the existing MySQL service: If you have a currently running MySQL service (even if it's malfunctioning), stop it first:

brew services stop mysql

Install MySQL 8.4

brew install [email protected]

Start and Stop MySQL 8.4

Briefly start and then stop the MySQL 8.4 service. This crucial step performs necessary database migrations and prepares the system for the final upgrade.

brew services start [email protected]
brew services stop [email protected]

Start MySQL 9.x

Now, start your desired MySQL version (9.0 or later). It should now launch correctly:

brew services start mysql

Remove MySQL 8.4

Finally, you can safely remove MySQL 8.4 from your system.

brew remove [email protected]

By following these steps, you can resolve the MySQL startup problem on macOS Sequoia 15.0.

@fergqwertyui
Copy link

Thank you! I had the same problem and this fixed it

@Kibersatanist
Copy link

omg, TYVM dude, it work's!

@syahzul
Copy link
Author

syahzul commented Oct 25, 2024

I've spent a few days to fix this issue before, and I'm glad it helps you guys.

@felixhtoo30
Copy link

Thanks. It still works in Sequoia 15.1.1.

I was necessary to run installing command brew install [email protected], and
start command brew services start [email protected]. It's worked again.

@teknosains
Copy link

Not working in my Sequoia. When tring to access mysql.

mysql -u root -p

still got the same error

@e-spitz
Copy link

e-spitz commented Dec 5, 2024

Not working in my Sequoia. When tring to access mysql.

mysql -u root -p

still got the same error

^^^ same for me

@teknosains
Copy link

End up using docker to host mariadb / mysql

@harijagarnauth
Copy link

It worked for me.

@isayahdurst
Copy link

Thanks so much, worked for me.

@Tasemu
Copy link

Tasemu commented Mar 20, 2025

Thank you so much!

@rameezmeans
Copy link

I tried this but still getting the same error.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

@swthate
Copy link

swthate commented Apr 11, 2025

This worked for me, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment