I am running a Mac on Monterey v 12.4 with an M1 Max. I tried to install mysql on my Mac but I never get it to work regardless what I do. The first thing I tried to do is:
$ brew install mysql
Then I start the server:
$ brew services start mysql
==> Successfully started `mysql` (label: homebrew.mxcl.mysql)
But when I try to execute the following command or any other mysql cli command:
$ mysql_secure_installation
I always get the following error:
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I've tried every possible fix I could find on the internet but nothing works.
I then tried to install the community server from the mysql website. It shows me in the settings it it's running properly, but I can't connect to the Server. Neither using the workbench nor the cli. So I removed it again.
I also did brew doctor
and fixed the issues.
I am really desperate to get the mysql server running for local programming and would appreciate any help! Thanks in advance!