hallo und guten Abend liebe Community,
vorweg: ich bin nicht 100 % sicher ob ich hier in diesem Subforum der Linux-Foren genau das richtige Forum getroffen habe aber ich denke mal dass es ggf doch passen sollte. Es ist im Grunde ein Server-Problem u. natürlich ein Linux-Problem.
Also hier geht es um die Installation einer Wordpress auf einem Server - und den hier gemachten Meldungen und Fehlermeldugnen : eigentlich müsste sich beim Installationsvorgang die Datei wp-config-sample.php zu wp-config.php umsetzen. Das passiert aber nicht.
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
hier hab ich folgende weitere Befunde: --- beim Installationsversuch
Code:
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
Click to expand...
Ich habe ferner versucht danach mal manuell die Datei zu editieren u. speicherte
die dann als Wp_config.php auf dem Server ab.
Btw: wundert mich etwas, dass dies nach mehreren Versuchen nicht von alleine geschrieben wurde - die wp-config.php
Darüber hinaus: was ich auch darüber hinaus noch gemacht habe:
entsprechen einer Anleitung auf WP-Beginner:
First thing you should do is to make sure that you are getting the same error on both the front-end of the site, and the back-end of the site (wp-admin). If the error message is the same on both pages “Error establishing a database connection”, then proceed onto the next step. If you are getting a different error on the wp-admin for instance something like “One or more database tables are unavailable. The database may need to be repaired”, then you need to repair your database.
ich habe also noch folgende - in der Anleitung gegebene Maßnahme verfolgt:
gem. How to Fix the Error Establishing a Database Connection in WordPress in der o.g. Anleitung:
Code:
define('WP_ALLOW_REPAIR', true);
nachdem die obigen Aktionen nicht zum Erfolg geführt haben - und sich nichts ändert versuche ich weiters....:How to Fix the Error Establishing a Database Connection in WordPress
den Einsatz eines Test-The-Connection-Scripts:
Code:
<?php
$link = mysqli_connect('localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysqli_error());
}
echo 'Connected successfully';
mysqli_close($link);
?>
Doch - was dann dabei rauskommt ist folgendes:
Code:
Warning: mysqli_connect(): (HY000/2002): No such file or directory in /sites/www.mysite.de/testconnection.php on line 2
Warning: mysqli_error() expects exactly 1 parameter, 0 given in /sites/www.mysite.de/testconnection.php on line 4 Could not connect:
Werde alles nun nochmals überprüfen und sehen wo der Fehler liegen kann.
Wie oben bereits geschrieben - habe ein Testscript eingesetzt dass helfen sollte die DB-Verbindung zu überprüfen - es gibt diese Ergebnisse zurück:
Code:
Warning: mysqli_connect(): (HY000/2002): No such file or directory in
/sites/www.mysite.de/testconnection.php on line 2
Warning: mysqli_error() expects exactly 1 parameter,
0 given in /sites/www.mysite.de/testconnection.php on line 4
Could not connect:
Also - in der Deutung der Ausgabe des Scripts - denke ich dass der Pfad nicht passt
und nun überlege ich ob denn ggf. hier etwas nicht passtl:
Code:
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define( 'WP_DEBUG', false );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}
/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );
Und ja - ich bin sicher dass ich es hier natürlich mit einem Linux-Serever-Thema ersten Ranges zu tun hab.
Hmm - ich denke dass ich das Testscript u. deren Ergebnisse richtig deuten muss.
Lesezeichen