E-Mail wurde erfolgreich versandt.

Ich bekomme die Fehlermeldung "Unable to connect to database" beim Zugriff auf das Plesk-Control Panel. Was kann ich tun?


Beispiele für eine derartige Fehlermeldung sind:

Unable to connect to database: get_admin_password() failed:
file_get_contents() failed:
0: /usr/local/psa/admin/auto_prepend/auth.php3:1 psaerror(string "Unable to connect to database: get_admin_password() failed:
file_get_contents() failed: ")


oder

/login.php3: Unable to connect to database: Unable to read admin.conf file: failed to open stream:
Permission denied, in /usr/local/psa/admin/auto_prepend/auth.php3 on line 39, plesk_errormsg=Unable to read admin.conf file: failed to open stream: Permission denied, php_errormsg=


Wir können Ihnen folgende Varianten anbieten, um das Problem zu lösen:

Veruchen Sie zuerst, Plesk neu zu starten
h1234: ~ # /etc/init.d/psa restart
Stellen Sie sicher, dass die Datei /etc/psa/.psa.shadow die richtigen Rechte besitzt.

Richtige Rechte sollten wie folgt aussehen:
h1234: ~ # ls -la /etc/psa/.psa.shadow
-rw------- 1 psaadm psaadm 5 Feb 26
11:22 /etc/psa/.psa.shadow
Sofern andere Rechte eingestellt sind, können Sie sie mit den folgenden Befehlen ändern:
h1234: ~ # chown psaadm:psaadm /etc/psa/.psa.shadow<
h1234: ~ # chmod 600 /etc/psa/.psa.shadow


Testen Sie, ob der MySQL-Server richtig läuft

Benutzen Sie hierzu den Befehl
h1234: ~ # ps ax | grep mysql

Beispiel:
h1234: ~ # ps ax | grep mysql

Sie sollten jetzt folgende Meldung erhalten:

7996 ? S 0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
8022 ? S 0:14 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
Diese Ausgabe bedeutet, dass der MySQL-Server läuft.

Um zu testen, ob der MySQL-Server richtig läuft, loggen Sie sich bitte in die mysql console ein.

Beispiel:
h1234: ~ # mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

Sie müssten jetzt folgende Meldung erhalten:

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1299 to server version: 3.23.54


Type 'help;' or 'h' for help. Type 'c' to clear the buffer.


mysql>
War dieser Text hilfreich für Sie?
Info: d741809fbeb586920238f34829f5a464569b4b1c