Issue 

 mysql -uroot

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

 

Solution

Need to make link

sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock


Problem

mysql.server start 

./opt/homebrew/Cellar/mysql/8.0.32/bin/mysqld_safe: line 144: /opt/homebrew/var/mysql/M1-MacBook-Pro.local.err: Permission denied

 

Solution

sudo chmod -R 777 /opt/homebrew/var/mysql/M1-MacBook-Pro.local.err


 

Problem

Reinstall mysql

 

 

Solution 

  1. First, make sure you have homebrew installed
  2. Run brew doctor and address anything homebrew wants you to fix
  3. Run brew install mysql
  4. Run brew services restart mysql
  5. Run mysql.server start
  6. Run mysql_secure_installation

 

--

Download mysql

https://dev.mysql.com/downloads/file/?id=518602

Use installer