Question

WordPress: Error establishing a database connection

Asked by: vallis

I have 3 active blogs on addon domains. The parent domain is http://www.mistywindow.com/

2 blogs are OK, but the one at the add-on domain http://mywitsend.co.nz gives this error when opening in a browser:

"Error establishing a database connection"

1.  I had not made any changes to this blog (or anything else) since the last successful logon in a browser. It therefore seems likely that there's been a glitch at the server end.

2.  I have run a database repair but it didn't fix the problem.

3.  Bluehost gave this reply:
"We apologize for the trouble you've been having, there was a bump in the msql service all should be working now however"

4.  I advised them that it hadn't fixed the problem and they ignored my plaintive cries for several days.
Eventually they suggested that I:
"logon and change the theme to default then back and everything should work."

5.  If I login here:
http://mywitsend.co.nz/wp-login.php?redirect_to=%2Fwp-admin%2F
Logging on appears to work, but I can't actually go anywhere from the logon.  I get a "back to mistywindow" link which goes to a blank page.

:o(

I've tried going directly to various PHP pages after logging on. No joy.

If any Expert wishes to logon to my Control Panel or the blog I'll send logon details off-list.

I have a current backup of the whole site. Unfortunately, it's supposed to be a 150MB compressed file but it's only half that size and won't extract.

Bugger.

Can someone help? Or do I need to bite the bullet and get on with my life?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-06-04 at 10:59:26ID23457689
Tags

WordPress

Topics

WordPress

,

MySQL Server

,

PHP Scripting Language

Participating Experts
3
Points
500
Comments
26

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. wordpress theme previewer?
    Hello, can i find a customizable wordpress script or a plugin for realizing a wordpress theme previewer like this site: http://topwpthemes.com thank you.
  2. PHP wordpress call theme and server directory
    I don't remember the php commands to call the theme directory. And I don't remember the php command to call the server (main root of wordpress) I did a quick google search.. but I thought maybe some fellow coders here knew the answer. Just a simple command to call the dire...
  3. help writing theme code for WP Web Scraper
    Trying to parse some HTML into a Wordpress theme using a plugin. Have asked on his blog and WP but no answer and I'm in a hurry! It works as a plugin, where you can scrape HTML into posts and pages. I need to add it into the theme template itself. http://wordpress.org/ext...
  4. My WP Blog's homepage has been hacked  and I can't lo…
    My WP-Blog's homepage (http://ssofia.com) has been hacked and it redirects to : http://usp4.net/usp4/redirector.php/ I checked my domain's settings and DNS servers they're OK. I can access my CPANEL, but I can't login to wp-admin. WORDPRESS doesn't recognize my username...
  5. Load Wordpress wp-config and theme outside of wordpre…
    Hi everyone! I have a connect script that I use to get content into my site, it cannot run inside of your typical wordpress_template.php files as it creates url encoded links (ie: myscript.php?title=article123). What I have done to bring in the wordpress theme to this scr...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: syedasimmeesaqPosted on 2008-06-04 at 11:06:42ID: 21712465

It's an install bug. You'll have to edit the database and change the domain and path settings manually.

 

by: syedasimmeesaqPosted on 2008-06-04 at 11:08:35ID: 21712476

or if you would like, try running this query on mysql.

SET PASSWORD FOR some_user@some_host = OLD_PASSWORD('your_old password_here');

are you using mysql 5?


 

by: nexusnationPosted on 2008-06-04 at 11:19:20ID: 21712571

If there's a "bump" in the mysql service, then something may very well have changed, which renders the settings in wp-config.php moot.

 

by: syedasimmeesaqPosted on 2008-06-04 at 11:24:09ID: 21712625

If you have phpmyadmin then go to SQL and run the above query. That could prove to  be the easiest way to solve it.

 

by: vallisPosted on 2008-06-04 at 11:58:45ID: 21712960

I think I'm out of my depth here.

1.  An install bug.
I don't understand. My knowledge of PHP is very limited - MySQL zero. This blog has been in successful use since the last upgrade to WordPress 2.5.1.

2.  BlueHost is running MySQL5. The current password seems to work. It's just that logging on doesn't take me anywhere.
Just to confuse the issue (for me at least). I have 5 MySQL databases and I can't figure out in cPanel which belongs to this particular blog.

A little knowledge is a dangerous thing...

:o(

3.

 

by: vallisPosted on 2008-06-04 at 12:05:56ID: 21713027

Now when I go to the site I don't even get the error message. Just a blank page.

 

by: syedasimmeesaqPosted on 2008-06-04 at 12:10:35ID: 21713071

ok the database should have a wp_ somthing in its tables and database name

 

by: syedasimmeesaqPosted on 2008-06-04 at 12:12:09ID: 21713096

you need to 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.

Once in the database, run the sql for that database I have posted above.
thanks

 

by: vallisPosted on 2008-06-04 at 12:30:07ID: 21713301

That's another problem syedasimmeesaq. See this new question:
http://www.experts-exchange.com/Database/MySQL/Q_23458034.html
:o)

 

by: vallisPosted on 2008-06-04 at 12:51:57ID: 21713521

OK. I now know which database I'm working with. Thanks Nexusnation.

:o)

 

by: nexusnationPosted on 2008-06-04 at 12:58:42ID: 21713577

Good, now check the wp-config.php files and make sure everything is right. :-)

It probably is; usually it's another issue such as what syedasimmeesaq has posted.

 

by: syedasimmeesaqPosted on 2008-06-04 at 13:21:59ID: 21713787

>>>>OK. I now know which database I'm working with.

if you know the database, go to phpmyadmin. click on the database name and then click SQL and run the above query by just copying and pasting from here
SET PASSWORD FOR some_user@some_host = OLD_PASSWORD('your_old password_here');

change some_user@some_host with your username and 'your_old password_here' with your old password

 

by: vallisPosted on 2008-06-04 at 14:49:53ID: 21714451

I get this when I use my site logon and similar if I use my blog logon:
______________________________________________________________

SQL query:

SET PASSWORD FOR mistywin = OLD_PASSWORD( 'myOldPassword' )

MySQL said: Documentation
#1044 - Access denied for user 'mistywin'@'localhost' to database 'mysql'
______________________________________________________________

Attached is the wp-config.php file. Looks alright to me, but what do I know? !

I note that the size of this database is about half that of my other blogs, but this one should be the biggest. It had more posts and more comments. Not a good sign I suspect.

<?php
// ** MySQL settings ** //
define('DB_NAME', 'mistywin_wrdp1'); // The name of the database
define('DB_USER', 'mistywin_wrdp1'); // Your MySQL username
define('DB_PASSWORD', 'k2FXYPZfWrR4'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = 'wp_';
// Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', ''); 
/* That's all, stop editing! Happy blogging. */
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:

Select allOpen in new window

 

by: syedasimmeesaqPosted on 2008-06-04 at 14:59:33ID: 21714543

try this

SET PASSWORD FOR mistywin_wrdp1 = OLD_PASSWORD( 'k2FXYPZfWrR4' )
Option 2:

if that doesn't work then go to myadmin and add a user and give the user the previllages that you want to give him. Make sure the user have previlages to this database mistywin_wrdp1 then in your configuration file change this part
define('DB_USER', 'Newuser');
define('DB_PASSWORD', 'Newpassword');

XXXXXXXXXX

by the way just looking at your config file you mentioned your username in query is
mistywin

where as in your configuration file it shows the user as
mistywin_wrdp1

maybe you just want to change the user name in configuration file first and see if that works. If not try what I suggested above

Hope it helps

 

by: vallisPosted on 2008-06-04 at 15:13:39ID: 21714634

Thanks for your patience.

I'd already tried that first option logon and password.

I'll now try your option 2. May take a while for me to figure it out.  I'll probably wait until I get another reply from BlueHost - sometime next century - before making any changes. Just in case I stuff things up further OR BlueHost say that I have.

 

by: dosthPosted on 2008-06-05 at 03:29:06ID: 21717810

can you tell me your current problem, what was resolved and what still need to be fixed

 

by: syedasimmeesaqPosted on 2008-06-05 at 08:24:52ID: 21720598

I think Vallis wants to wait on Bluehost. However if they don't reply you :-) as you mentioned, you may try the option that I told you by changing the configuration files user name. You can always change it back. Let us know.
Thanks

 

by: vallisPosted on 2008-06-05 at 11:36:22ID: 21722594

Thanks people.
I'm on hold at the moment. BlueHost told me they couldn't help yesterday. This morning my time (GMT +12) they said they can.
I'll give it another 24 hours and then apply some of what I've learned here and elsewhere.


 

by: dosthPosted on 2008-06-05 at 23:05:00ID: 21726573

Best of luck

 

by: vallisPosted on 2008-06-12 at 22:02:23ID: 21776095

Bluehost have been no help and communication with them is so slow as to be useless. They can't log onto my database using my logon details.

The same problem occurred with this same blog some months ago.
I got this answer after Bluehost went in and changed the password:

"Generally speaking this will happen for only one of two reasons: Either the password associated with the user name was changed somehow, or someone changed the password in the wp-config.php file. Chances are the password simply became corrupted and needed to be refreshed."

Great.

Current situation:
1.    I tried to reset the password as suggested above without success.
2.    Now, instead of the original error message I just bet a blank screen if I go to the blog's URL.
3.    If I go here: http://mywitsend.co.nz/wp-login.php  I get a login screen but when I logon using my password or the password shown in wp-config.php nothing happens.
4.   If I click on the lost password link I get an email with a reset link: http://www.wp-login.php/?action=rp&key=StDxR&x4f9Vp
That link doesn't exist.

I am resigned to probably having to set up this blog again from scratch, but would be very pleased if I could recover the text of my posts.




 

by: vallisPosted on 2008-06-12 at 22:21:28ID: 21776143

@   syedasimmeesaq:
You said above:
"..... go to myadmin and add a user and give the user the privileges that you want to give him......"

If you mean my blog Admin, I can't access the site so I can't do that.

Or am I misunderstanding you?

I can only access this blog, which is an addon domain, from my host's control panel.

 

by: dosthPosted on 2008-06-12 at 23:10:15ID: 21776300

this so time consuming, cant you take a backup of sql and do a fresh install and reload ?

 

by: vallisPosted on 2008-06-12 at 23:13:39ID: 21776310

Probably.
:o)
It occurred to me, I'd be happy to do that if I thought it would work.

 

by: dosthPosted on 2008-06-12 at 23:32:20ID: 21776387

please take a backup and try:)

 

by: vallisPosted on 2008-06-14 at 17:11:28ID: 21787037

Managed to resurrect the blog but the database is trashed. Just like my backups.
:o)

 

by: dosthPosted on 2008-06-15 at 23:37:47ID: 21791159

thanks

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...