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?
why i got this error sometimes what do you think about this problem?
That's the key; if it only happens sometimes, it's an intermittent issue at the webhost. The webhost needs to look in the MySQL logs and PHP logs for connection errors, timeouts, MySQL crashes, etc, anything that will point to the cause of the intermittent issues.
If you had "Error establishing a database connection" all the time, that points to a definite error you made in wp-config.php
.
Tell the webhost and administrator to look at their logs to see when the MySQL server is going down and why.
If this is your own server, you need to know the OS and other details so you can search Stack Overflow for the information. Log locations vary, depending on the OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With