ulduz114 ulduz114 - 1 month ago 12
MySQL Question

Error establishing a database connection on wordpress

i have a blog with wordpress but sometimes i have problem with that

i got blow error

Error establishing a database connection
This either means that the username and password information in your

wp-config.php
file is incorrect or we can't contact the database server at
%s
. This could mean your host's database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums

and this is my config file

define('WP_HOME','http://www.mysite.com');
define('WP_SITEURL','http://www.mysite.come');
define('DB_NAME', 'mydbname');

/** MySQL database username */
define('DB_USER', 'dbusername');

/** MySQL database password */
define('DB_PASSWORD', 'dbpassword');

/** MySQL hostname */
define('DB_HOST', 'mysite.com');


why i got this error sometimes what do you think about this problem?

i contact with my admins server and they said "we dont have any problem with server and mysql service"

does my server have problem or my config have problem?

Answer

It's the server or the web host. Tell them to look at their logs to see when the MySQL server is going down. Who is the host?