
We are installing MySQL Community Server 5.7.23. If the mysql service is not started, try to start it manually:īrew services start mysql or if you installed do this brew services start it does not want to start: brew services stop mysqlīrew unlink link: brew link -force -overwrite mysql or if you installed do this brew link -force -overwrite try again:īrew services start mysql or if you installed do this brew services start this helps and if what you are looking for is to run multiple mysql versions at the same time then you'll need different database location configuration to avoid conflicts.Access in browser again and it should now display php information. 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
:max_bytes(150000):strip_icc()/how-to-install-mysql-on-macos-4586389-11-5c53ced046e0fb0001c07ea3.jpg)
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.
