Mandriva LAMP phpMyAdmin connection problem
Author Message
Posted : Sat, 25 October 2008 20:32:00
Subject : Mandriva LAMP phpMyAdmin connection problem
Hello, First of all I am still quite a beginner in the Linux world. I recently installed mandriva and today I got around to installing the LAMP package (from the repositories) and everything went smooth (almost :P). Everything seems to work, except the phpMyAdmin connection (or MySQL in general, I'm not sure which is the problem. Anyways, when I try to connect as root on phpMyAdmin (using "root" as username and a blank password as I think that is supposed to be the default, right?) , I get the following error: #2002 - Le serveur ne répond pas. (ou l'interface de connexion ("socket") vers le serveur MySQL local n'est pas correctement configurée). or in English: #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured). And when I run "mysql -u root mysql", I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Anyone know what to do here? Thank you very much! :)
proopnarine
Posted : Sun, 26 October 2008 03:43:26
Subject : Mandriva LAMP phpMyAdmin connection problem
This is a frequent problem and it has driven me nuts in the past. I'm not sure if this is the cause in your case, but 1. Make sure that the mysql daemon is actually up and running. 2. Make sure that you've installed the mysql db, since some distros. do not do this automatically. Follow the post-installation procedures here http://dev.mysql.com/doc/refman/5.1/en/unix-post-installation.html 3. And failing all else, look here http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/
JoshuaWohle
Posted : Sun, 26 October 2008 08:31:45
Subject : Mandriva LAMP phpMyAdmin connection problem
Am trying to solve it at this vey moment :) I now get the error: mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! when I try "mysqladmin version"
JoshuaWohle
Posted : Sun, 26 October 2008 10:10:10
Subject : Mandriva LAMP phpMyAdmin connection problem
I really can't figure this one out :(
proopnarine
Posted : Mon, 27 October 2008 06:06:53
Subject : Mandriva LAMP phpMyAdmin connection problem
Hmm, have you checked that the mysql daemon is running? Does ps -A return a pid for mysqld?
Florian N
Posted : Fri, 31 October 2008 03:09:06
Subject : Re: Re: Mandriva LAMP phpMyAdmin connection problem
First try and restart mysql. If that does not help best way to find an issue is to check the logs. Mysql does not output to a log file by default so you have to set this. Open /etc/my.cnf and add the next line(to save the errors) in the [mysqld] area to look like this: [mysql] other settings you have in here log-error=/var/log/mysql.log Save the file then do this: touch /var/log/mysql.log chown mysql.mysql /var/log/mysql.log Start mysql now and check the log file for the error, that will tell you were the issue is. Hope this helps [Modified by: Florian N on October 30, 2008 10:10 PM] [Modified by: Florian N on October 30, 2008 10:11 PM]