Support » Localhost Installs » error establishing a database connection

  • celinerch

    (@celinerch)


    Hello, I know this topic has been asked many times but I do not find the answer in any of them.
    I started constructing a website on a local server using WAMP. However, today, I cannot access localhost/wordpress (my db) and it is said “error establishing a database connection”.

    I tried to modify the wp-config file with my user data, to modify my password, etc, but nothing worked and I do not know what to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • MilesWeb

    (@milesweb)

    Hello,

    Did you check if the database server is running? Also, try to repair the database once and check if the error persists. Make sure you have taken the backup of the database and then proceed.

    • This reply was modified 2 weeks ago by MilesWeb.
    Thread Starter celinerch

    (@celinerch)

    Hello,

    Yes, the db server is running, I’m using WAMPserver and all services seem to be working fine.
    I’ve just tried to repair the database through phpMyAdmin, however, it does not seem to have worked.
    I also have this error message when trying to access the website again:

    ( ! ) Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘root’@’localhost’ (using password: YES) in C:\wamp64\www\wordpress\wp-includes\class-wpdb.php on line 1987
    Call Stack#TimeMemoryFunctionLocation10.0002366840{main}( )…\index.php:020.0003367544require_once( ‘C:\wamp64\www\wordpress\wp-admin\admin.php )…\index.php:1030.0005368120require_once( ‘C:\wamp64\www\wordpress\wp-load.php )…\admin.php:3440.0024369064require_once( ‘C:\wamp64\www\wordpress\wp-config.php )…\wp-load.php:5050.0025370512require_once( ‘C:\wamp64\www\wordpress\wp-settings.php )…\wp-config.php:9660.0072586392require_wp_db( )…\wp-settings.php:12470.0074588192wpdb->__construct( $dbuser = ‘root’, $dbpassword = ‘zawiya’, $dbname = ‘wordpress’, $dbhost = ‘localhost’ )…\load.php:68380.0075588192wpdb->db_connect( $allow_bail = ??? )…\class-wpdb.php:76790.0075588912mysqli_real_connect( $mysql = class mysqli { public $client_info = ‘mysqlnd 8.2.13’; public $client_version = 80213; public $connect_errno = 1045; public $connect_error = ‘Access denied for user \’root\’@\’localhost\’ (using password: YES)’; public $errno = 1045; public $error = ‘Access denied for user \’root\’@\’localhost\’ (using password: YES)’ }, $hostname = ‘localhost’, $username = ‘root’, $password = ‘[Sensitive Parameter]’, $database = NULL, $port = NULL, $socket = NULL, $flags = 0 )


Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.