Skip to content

trying to install and use mysql with homebrew turns into the following error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) #5770

Discussion options

You must be logged in to vote

May be worth manually running foreground command with higher logging level to see if it outputs information on what is exact reason. The current logs oddly claim to use the dir and then claim it can't find the dir:

2024-11-26T22:39:04.436690Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2024-11-26T22:39:04.440323Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.

Could also check is if there is a running process for prior MySQL in ps or Activity Monitor.


Without additional information, only possibility I can think of is the MySQL 9 initialized DB at /opt/homebrew/var/mysql is inco…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by marcosdipaolo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants