mac Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) -
// must running multiple server that i why this is happen for linux or mac users
try to login via this command
==>> mysql -h 127.0.0.1 -P 3306 -uroot -p
-h Host
-P Port nummber // p should capital
//check you have my sql server up and running
===> brew services restart mysql
/// other solution to debug this
download mysql work bench here you can connect to server easly
// then under adminstration section > users & privileges you can change the password or
add adminstrative role to user user
//happy coding :)