0

I'm trying to install an opensource software on my local and I'm running zendserver on linux ubuntu.

I created the database and provided a correct user and password. But as soon as I click on submit button I get a MySQL 2002 error saying:

(2002) No such file or directory

I tried to restart apache2 but still I get the same error after I have restarted apache2.

How can I resolve this Mysql error?

Mthe beseti
  • 599
  • 1
  • 10
  • 29
  • Try the below link All the best :) http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directory/24371396#24371396 – Jignesh Rawal Jun 23 '14 at 17:22

1 Answers1

0
  1. You don't have permissions to access the directory /var/lib/mysql/whatever.sock because mysql is the owner of the folder or
  2. /path/whatever.sock doesn't exist.

You can try this though [Linux specific, but what other operating systems are there?] Go to /etc/my.cnf and change/add the lines:

[mysqld] datadir=/var/lib/mysql socket=/tmp/mysql.sock [client] socket=/tmp/mysql.sock

This way the client and server use the same socket and it's in a public directory.

Dinesh
  • 4,066
  • 5
  • 21
  • 35