Try the following command in your terminal:
mysql -h localhost -P 3306 -u root -p
If you successfully connected to your database, the same thing should happen with the Mysql Workbench .
If you cannot connect, I think port 3306 received by another process.
Find which process is running on port 3306 . If necessary, grant administrator rights using sudo .
netstat -lnp | grep 3306
Complete this process and restart the MySQL server. Are you ready to go
Run the command below to find the my.cnf file on macbook.
mysql --help | grep cnf
You can change the MySQL port to any available port on your system. But after that, be sure to restart the MySQL server.
source share