I am getting a following error message while establishing a database connection in WordPress -
"Error establishing a database connection"
why am I receiving this error ? does anyone know about this problem ?
plz help....
I am getting a following error message while establishing a database connection in WordPress -
"Error establishing a database connection"
why am I receiving this error ? does anyone know about this problem ?
plz help....
This is an installation error. To avoid/resolve this, you need to manually edit the database and change the domain and path settings.
The MySQL concurrent connections is may have set too low. If there's a "bump" in the mysql service, then something may have changed for sure, which renders the settings in wp-config.php moot.
Try running this query on mysql.
SET PASSWORD FOR some_user@some_host = OLD_PASSWORD('your_old password_here');
The database must have a wp_ something in its tables and database name
now, look for the prefix that you had given while installing it. If its default, it should have a wp_yourdatabasename or wp_youtablename within our databases. If you go to phpmyadmin and look at the databases you will see that.
Run the sql for that database.
Check your host. Because, i think depending on the software running within the box, it may be adding (something like your username) to the name of the mysql-user or mysql-database.
WordPress 2.0+ users can find the lines to edit within ‘/wp-includes/wp-db.php’. Beginning immediately below line 307, save the following:
default Wordpress database error pages are more important for website administrators or webmasters , you can change the error page to another different error page by modifying text in the error page by customizing the wp-db.php file located in wp-include directory./* custom error page hack
shows a custom error page and emails error instead of
showing the default wordpress database error page */
include('wp-content/themes/themename/dbase-error.php');
$error = ( !$this->show_errors ) ? '' : $this->show_errors ;
mail('admin@domain.com', 'WordPress Error', $error);
die;
/* end custom error page hack */
Bookmarks