• Ich habe bereits viele Blogs zu dem Problem gelesen. Ich hoste meine Seite selbst und habe vollen Zugang zum System, ich habe es aufgesetzt und bin Informatiker (Schwerpunkt Application Delivery Controller). Mit WordPress kenne ich mich im geringfügigen Umfang aus.

    Passiert ist es, nachdem ich die Datenbank repariert habe.

    a) Benutzername und Kennwort sind OK. ich habe die Credentials mehrmals geprüft, zuletzt habe ich die Datenbank mit exakt diesen Credentials (cut&paste username, password, databaseaus der wp-config.php) gebackupt.

    b) MarinaDB läuft auf dem selben Host, und der heißt in der Config localhost. Marina ist OK, eine andere website läuft auf dem Host problemlos.

    c) ich habe die Datenbank repariert (define('WP_ALLOW_REPAIR', true);)

    d) Alle Plugins entfernt, alle Themen entfernt.

    Ich kann das wp-admin tool nicht öffnen. Ich komme immer nur bis zur Aufforderung „One or more database tables are unavailable. The database may need to be repaired.“ Das Reparieren bringt nichts.

    Ich habe dann noch:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
    define( 'SCRIPT_DEBUG', true );

    eingefügt, aber das bewirkt nichts. weder werden debug-informationen angezeigt, noch entsteht ein Log. Im Log von der MarinaDB steht nichts Aussagekräftiges.

    Ich wäre sehr froh, wenn mir jemand sagen könnte, wo ich weiter suchen soll. Danke vielmals

    Jochy

    Beiliegend meine wp-config.php (alle Passworte sind entfernt)

    <php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://wordpress.org/support/article/editing-wp-config-php/
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'my-db' );
    
    /** MySQL database username */
    define( 'DB_USER', 'user' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', 'passwd' );
    
    /** MySQL hostname */
    define( 'DB_HOST', 'localhost' );
    
    /** Database Charset to use in creating database tables. */
    define( 'DB_CHARSET', 'utf8mb4' );
    
    /** The Database Collate type. Don't change this if in doubt. */
    define( 'DB_COLLATE', '' );
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    
    // alle Keys habe ich entfernt
    define( 'AUTH_KEY',         '' );
    define( 'SECURE_AUTH_KEY',  '' );
    define( 'LOGGED_IN_KEY',    '' );
    define( 'NONCE_KEY',        '' );
    define( 'AUTH_SALT',        '' );
    define( 'SECURE_AUTH_SALT', '' );
    define( 'LOGGED_IN_SALT',   '' );
    define( 'NONCE_SALT',       '' );
    
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each
     * a unique prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix = 'wp_xxx_';
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     *
     * For information on other constants that can be used for debugging,
     * visit the documentation.
     *
     * @link https://wordpress.org/support/article/debugging-in-wordpress/
     */
    // define( 'WP_DEBUG', false );
    
    // Disable display of errors and warnings
    // define( 'WP_DEBUG_DISPLAY', false );
    // @ini_set( 'display_errors', 0 );
    
    // Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    // define( 'SCRIPT_DEBUG', true );
    
    /** disable wp-cron.php https://kinsta.com/de/wissensdatenbank/wp-cron-deaktivieren/ **/
    define('DISABLE_WP_CRON', true);
    
    /** Memory limit */
    define('WP_MEMORY_LIMIT', '768M');
    
    /* That's all, stop editing! Happy publishing. */
    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
            define( 'ABSPATH', __DIR__ . '/' );
    }
    
    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';
    
    /* for repairing data bases, remove comments from next comment */
    // define('WP_ALLOW_REPAIR', true);
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
    define( 'SCRIPT_DEBUG', true );
    • Dieses Thema wurde geändert vor 2 Jahren, 2 Monaten von jochyn.
    • Dieses Thema wurde geändert vor 2 Jahren, 2 Monaten von jochyn. Grund: Präziser formuliert
    • Dieses Thema wurde geändert vor 2 Jahren, 2 Monaten von Bego Mario Garde. Grund: Code formatiert

    Die Seite, für die ich Hilfe brauche: [Anmelden, um den Link zu sehen]

Ansicht von 6 Antworten – 1 bis 6 (von insgesamt 6)
  • Es könnte sein, dass die Datenbank physikalisch defekt ist, sprich, eine der Tabellendateien kaputt ist. Da hilft meist nur das Einspielen eines Backups.

    Thread-Starter jochyn

    (@jochyn)

    Danke, @bscu. Das habe ich mir auch schon gedacht, aber ich habe MarinaDB gefragt, und MarinaDB hält die Datenbank für OK.

    Ich könnte mich erwürgen, aber Backup habe ich leider kein wirklich Gutes (ich weiß, …). Ich habe mir die Datenbank angesehen, sie sieht eigentlich ganz gut aus, zumindest meine Beiträge scheinen alle da zu sein, auch die Letzten.

    Meinst Du, ich soll ein neues Blog anlegen, und die Beiträge und Medien rücksichern? Oder auf einen alten Snappshot gehen und die fehlenden Beiträge neu einspielen?

    Hast du phpMyAdmin zur Verfügung oder ein anderes Tool, um dir die Inhalte aller Tabellen anzusehen? Eventuell auch mal ein Repair ohne WordPress durchführen.

    Thread-Starter jochyn

    (@jochyn)

    Klar, @bscu MarinaDB bringt ja Tools mit, und man kann den Inhalt ja dumpen. Repair mit MarinaDB-Tools habe ich gemacht, aber MarinaDB fand an der Datenbank nichts auszusetzen :'(

    Die Datenbankstruktur, die Indizes, alles OK.

    Sehr merkwürdig, da fällt mir im Moment auch nichts mehr ein. Vielleicht kann dir noch jemand Anderes einen Tipp geben.

    Eventuell hier noch mal alle Schritte durchgehen: https://gowp.com/how-to-fix-error-establishing-a-database-connection-in-wordpress/

    PS: Das Mädel heißt Maria, nicht Marina 😉

    • Diese Antwort wurde vor 2 Jahren, 2 Monaten von bscu geändert.
    Moderator Bego Mario Garde

    (@pixolin)

    Moderator (nicht mehr aktiv)

    Bei der gleichen Fehlermeldung berichtet ein User auf Stackoverflow, dass er sich mit den Indizes der Datenbank-Tabellen beschäftigt hat und dort Unstimmigkeiten gefunden hat: https://stackoverflow.com/a/68182860/12490449 – vielleicht hilft das weiter?

Ansicht von 6 Antworten – 1 bis 6 (von insgesamt 6)
  • Das Thema „Error establishing a database connection“ ist für neue Antworten geschlossen.