2
Abhimanyus-MacBook-Pro:~ abhimanyuaryan$ /usr/local/zend/mysql/bin/mysql -u root

ERROR 2002 (HY000): Can't connect to local MySQL server through 

socket '/usr/local/zend/mysql/tmp/mysql.sock' (2)

I was trying to use MySQL database via terminal using the above command but then this error message showed up. How to fix it?

hehehehe
  • 183
  • 1
  • 2
  • 6

1 Answers1

0

try bellow command

mysql -u root -h localhost -p

and give the root password or you can install phpmyadmin and use it directly form the http://localhost/phpmyadmin after installing phpmyadmin.

vrkansagara
  • 606
  • 6
  • 13