Link to home
Start Free TrialLog in
Avatar of wlait
wlait

asked on

phpMyAdmin Error #2002

Hello,

I am currently trying to get a xserve we use as web server back up and running after it went down during a power failure last week.  Since it didnt shut down gracefully I have had trouble with the MySQL and PHP services.  At first I couldnt get mysql to run at all.  After reinstalling mysql 5, I was able to get mysql running again.  I then installed phpMyAdmin so that I could create a new database/mysql user for a web application that I plan on running. However, I keep receiving an error in the setup of phpMyAdmin that says #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured).  I have received similar errors, not just in phpMyAdmin,  but in my console log whenever I was trying to start mysql with no avail.  I get this error despite setting phpMyAdmin to connect with TCP instead of socket. Im pretty sure this issue has to do with my installation of php.  Do I just need to reinstall php?

Mac OS X 10.4.11 Server
Xserve Dual 2.3 Ghz PowerPC G5
1 GB DDR SDRAM

Any help is greatly appreciated. Thanks!
Avatar of MMDeveloper
MMDeveloper
Flag of United States of America image

once when I reinstalled mysql, the socket was placed in a different location, I'd create a phpinfo(); page to find where the mysql.sock file is and make sure the path matches what you have in the phpMyAdmin config.inc.php file

since I dont know your background I must start with the simplest of attempts
Avatar of wlait
wlait

ASKER

So I just performed a fresh reinstall after making a number of changes that didn't work.  In trying to configure phpMyAdmin to create a new database I received the error&

Cant connect to local MySQL server through socket /var/mysql/mysql.sock 

I then realized that I still needed to initialize the root account password.  However, when I enter in any of the mysqladmin commands needed to do this I receive the following error.

Cant connect to local MySQL server through socket /var/mysql/mysql.sock (38) Check that mysqld is running and that the socket: /var/mysql/mysql.sock exists!

After doing a little research I realized that my mysql.sock file was actually in the /tmp/ directory.  After copying it to the appropriate location, still no luck.  Any ideas?

Thanks.
Avatar of wlait

ASKER

Attached is the output from my phpinfo() file.

Looks like php sees the socket at /tmp/mysql.sock.  However, when I try to secure the intial root accounts of MySQL I still get the error for /var/mysql/mysql.sock even after copying the mysql.sock there from the /tmp/ folder.  Any thoughts?

Thank you.
phpinfo.pdf
ASKER CERTIFIED SOLUTION
Avatar of wlait
wlait

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial