Am Mittwoch, 21. Februar 2001 13:30 schrieb Oliver Röwert:
Hagen Hoepfner wrote:
PHP:
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
normaler Nutzer:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Normalerweise sollte die Rechte für das (die?) Socket so aussehen: srwxrwxrwx 1 mysql daemon 0 Feb 21 13:23 /var/lib/mysql/mysql.sock
So siehts aus ....
Wenn sie das nicht tun - keine Ahnung! Wenn sie so aussehen, sucht PHP und Dein lokaler Benutzer vermutlich die Socket an einer anderen Stelle. Schau Dir mal die Datei /etc/my.cnf an. Da steht der Pfad zu Socket-Datei drin. Dann schau in die php.ini (normalerweise /etc/httpd/php.ini, ansonsten sagt dir phpinfo() wo sie liegt), unter [MySQL] den Parameter: mysql.default_socket = ; default socket name for local MySQL connects. If empty, uses the built-in
Bis hierhin auch alles OK
Der sollte leer sein, oder zumindest den gleichen Wert wie in /etc/my.cnf tragen. Zu dem Problem der lokalen User: Ich meine es gibt eine lokale Variante der Datei my.cnf (.mycnf?) im home-Verzeichnis des Users. Schau da doch mal rein.
Ne, die datei gibt es wohl nicht. Zumindest nicht bei mir. Hagen -- Hagen Hoepfner Uni MD / FIN / ITI / AG DB ----------------------------------------------------- eMail: hoepfner@iti.cs.uni-magdeburg.de Homepage: http://wwwiti.cs.uni-magdeburg.de/~hoepfner