can't access mysql in zend server

180 Views Asked by At
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?

1

There are 1 best solutions below

0
On

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.