

Then make sure the mysql service is running:īrew services list should show you this: mysql started root ~/Library/LaunchAgents/ Then installed mysql brew install mysql or brew install depending on which version you want. Once all cleaned up I rebooted my machine Then backup any database you had and remove the /opt/homebrew/var/mysql/ folder to start fresh cp -R /opt/homebrew/var/mysql /opt/homebrew/var/mysql_bak The removed manually these files/folders rm /opt/homebrew/etc/my.cnf etc for all mysql versions I might have installed before including mariadb brew remove mariadb

You can check these great instructions to cleanup if the way I did it bellow does not work for you: mysql cleanup OSX What worked for me was to do a deep cleanup. I had the same issue with Monterey trying to get mysql to work. I am really desperate to get the mysql server running for local programming and would appreciate any help! Thanks in advance! I also did brew doctor and fixed the issues. It shows me in the settings it it's running properly, but I can't connect to the Server. I then tried to install the community server from the mysql website. I've tried every possible fix I could find on the internet but nothing works. => Successfully started `mysql` (label: )īut when I try to execute the following command or any other mysql cli command: $ mysql_secure_installationĮrror: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Then I start the server: $ brew services start mysql The first thing I tried to do is: $ brew install mysql I tried to install mysql on my Mac but I never get it to work regardless what I do. I am running a Mac on Monterey v 12.4 with an M1 Max.
