admin管理员组文章数量:1305376
After transferring a working WordPress site to GoDaddy hosting, we've begun getting "Error establishing a database connection" errors on all pages- first intermittently, and now consistently. It's strange because it worked most of the time, at least at the beginning, but now errors all the time. This is all within the first few hours of our install- I'm wondering if this might be a database caching issue on WordPress? Is there a cache to clear?
Thanks-
After transferring a working WordPress site to GoDaddy hosting, we've begun getting "Error establishing a database connection" errors on all pages- first intermittently, and now consistently. It's strange because it worked most of the time, at least at the beginning, but now errors all the time. This is all within the first few hours of our install- I'm wondering if this might be a database caching issue on WordPress? Is there a cache to clear?
Thanks-
Share Improve this question asked Jul 12, 2011 at 18:28 YarinYarin 2653 silver badges9 bronze badges3 Answers
Reset to default 2-First, try contacting the hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, etc .
- double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.
-Then check that you don't need to change the database host from "localhost" to something else. You can get that info from your hosting provider.
-Check you have actually created a database with the same database name as is in your wp-config.php file.
-Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider.
There are also many threads on this topic on WP forums: http://wordpress/search/Error+establishing+a+database+connection?forums=1
My problem has been resolved.
On investigation, it could be seen that the website is loading database connection error when the database user is exceeding the maximum allowed connections per user which is 10.
In our shared platform, they allow a maximum of 10 concurrent connections to a database, which is ideal in the shared platform and unfortunately, it is not possible to increase this limit.
So, I have upgraded my hosting plan. It’ working fine now.
I had the same problem (in a VPS). Tried almost everything (disable all plugins, repair the database, change theme, check logs) until thinking that it could be a server configuration error (indeed I posted it here).
Seeing that it just happened for one of my sites (with WP), I guessed that it has to be a WP configuration error, so I checked again config.php
and I saw:
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
And yes! Removing this line the error disappeared, probably because this line was repeated somewhere in the plugin directory.
本文标签: quotError establishing a database connectionquotIntermittent error on GoDaddy
版权声明:本文标题:"Error establishing a database connection" - Intermittent error on GoDaddy 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741804331a2398408.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论