Error establishing a database connection
-
Hello,
I suddenly started getting an ‘Error establishing a database connection’ error on load of my WooCommerce site which is hosted on CyberPanel under Centos 8.
To understand what’s going on, I’ve put the following in wp_config.php:
define(‘WP_ALLOW_REPAIR’, true);
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true);That uncovered the following stack trace:
( ! ) Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘w8WI11****’@’localhost’ (using password: YES) in /home/mydomain.com/public_html/wp-includes/wp-db.php on line 1653
Call Stack
# Time Memory Function Location
1 0.0009 372512 {main}( ) …/repair.php:0
2 0.0012 373000 require_once( ‘/home/mydomain.com/public_html/wp-load.php’ ) …/repair.php:10
3 0.0015 373400 require_once( ‘/home/mydomain.com/public_html/wp-config.php’ ) …/wp-load.php:37
4 0.0025 374800 require_once( ‘/home/mydomain.com/public_html/wp-settings.php’ ) …/wp-config.php:84
5 0.0546 832240 require_wp_db( ) …/wp-settings.php:124
6 0.0610 836424 wpdb->__construct( ) …/load.php:527
7 0.0610 836424 wpdb->db_connect( ) …/wp-db.php:632
8 0.0611 838000 mysqli_real_connect ( ) …/wp-db.php:1653
Access denied for user ‘w8WI11****’@’localhost’ (using password: YES)Error establishing a database connection
I seem to be able to access the DB via the phpMyAdmin UI through CyberPanel and there I can see that in the DB that seems to be associated with my WordPress app (w8WI11****) there’s an option to change a password at the following URL: https://mydomain.com:8090/phpmyadmin/server_privileges.php?username=w8WI11****&hostname=<myIP>.
I attempted to change the password to the one in the wp_config.php.
After rebooting Lightspeed server and retry, the erroneous behavior still persists.
How can I recover from this?
Why wouldn’t the application start while the DB is perfectly accessible via phpMyAdmin?
I’d appreciate if anyone could guide me at fixing this issue.
Thank you in advance.
The page I need help with: [log in to see the link]
- The topic ‘Error establishing a database connection’ is closed to new replies.