• The VM runs in Virtual Box on my personal PC at home, and while doing something unrelated, I restarted my PC (it probably warned me there was a VM running, and I probably said restart anyway). After the PC restarted, I started the VM again, but now when going to the website URL, I now get the error mentioned. Note before the PC shutdown, everything was working correctly.

    It uses MariaDB.
    sudo /opt/bitnami/ctlscript.sh status mariadb it reads mariadb already running

    I ran sudo /opt/bitnami/ctlscript.sh restart mariadb just to make sure , Restarted mariadb

    I tried ping 127.0.0.1and it shows 30 packets transmitted, 30 received 0% packet loss

    I tried mysql -u root -p and using the application password, successfully logs into MariaDB monitor and shows id and Server version

    After logging into MariaDB Server, i ran SHOW GRANTS FOR 'bn_wordpress'@'127.0.0.1'; and it says ERROR 1141 (42000) There is no such grant defined for user bn_wordpress on host 127.0.0.1 MariaDB

    I tried mysql -u bn_wordpress -h 127.0.0.1 -p using the default password (and by default i mean the one we see when the VM first loads) , and it returns Error 1045 (28000): access denied for user 'bn_wordpress'@127.0.0.1 (using password: YES)

    Also, inside wp-config.php, I changed the following:
    define('WP_DEBUG',true); #it was false
    added define( 'WP_ALLOW_REPAIR', true );

    After i go to https://www.yoursite.com/wp-admin/maint/repair.php , here’s what I get:

    Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘bn_wordpress’@’127.0.0.1’ (using password: YES) in /opt/bitnami/wordpress/wp-includes/class-wpdb.php on line 2019
    Access denied for user ‘bn_wordpress’@’127.0.0.1’ (using password: YES)

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at 127.0.0.1:3306 could not be established. This could mean your host’s database server is down.

    Are you sure you have the correct username and password? No, I’m not sure bc i have recent edited this value, so i don’t know what it was originally (that was dumb). Does this need to be reset or something?
    Are you sure you have typed the correct hostname?
    Are you sure the database server is running?
    If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.

Viewing 1 replies (of 1 total)
  • Also, inside wp-config.php, I changed the following:
    define('WP_DEBUG',true); #it was false
    added define( 'WP_ALLOW_REPAIR', true );

    After i go to?https://www.yoursite.com/wp-admin/maint/repair.php?https://machance-casino-en-ligne.com/ here’s what I get:

    It looks like you have a permissions issue with your WordPress database. When you restarted your PC, the MariaDB service may have restarted as well. However, the permissions for the bn_wordpress user may have been lost. Log in to the MariaDB console as root.
    Run the following command to grant all privileges to the bn_wordpress user:
    GRANT ALL PRIVILEGES ON . TO ‘bn_wordpress’@’localhost’;
    Flush the privileges:
    FLUSH PRIVILEGES;
    Log out of the MariaDB console. Then try accessing your WordPress website again

Viewing 1 replies (of 1 total)
  • The topic ‘Bitnami WordPress with NGINX and SSL – Error establishing a database connection’ is closed to new replies.