Im a macbook user. I try to access mySQL through the terminal, but after entering the password, I receive an error message. Like this
Pasindu@Pasidus-Air ~ % mysql -h localhost -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
How to fix that problem.