localhost not able to select the database.
Posted by: mafgirl (---.ppp.as43234.net)
Date: November 08, 2011 08:54AM

Hello all, I thought I posted a message on here last week, but as it happens, I was in Paris and it automatically posted it in the French forum! So I've posted it here now - no idea how to close it in the French one though..

Date: 03 November 2011 à 09:55

Wamp Server 2.1
I have quite a few existing local (WordPress) websites which all worked perfectly. until one day suddenly (at least to me) I got this error message for ALL my local websites (All WP websites) when trying to access the dashboard:

"Can’t select database

We were able to connect to the database server (which means your username and password is okay) but not able to select the easylunchcompany database.

Are you sure it exists?
Does the user corrigan_corri have permission to use the easylunchcompany database?
On some systems the name of your database is prefixed with your username, so it would be like username_easylunchcompany. Could that be the problem?

If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums."

I've double checked the names of the databases and users ant they are all correct and the users have permission like they have always had.

I've searched this forum and google, but have not been able to find any solutions or things to check or try.
Does anyone here know what might be wrong? Wamp is online and green, I can access phpAdmin without problems.. I've tried restarting WAMP, restarting my computer, but none of it works, I still get the error message..

PS I only get the above message when going to .../wp-admin, when going to any of the homepages of any of my local sites, I get this message: Error establishing a database connection.

Thanks!!!

[www.mafgirl.com]

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: yfastud (Moderator)
Date: November 09, 2011 02:02AM

Try to install new wordpress, then follow the guide to move current wordpress to new one


To setup Wordpress on Wamp, follow this
[blog.jlbn.net]

To move Wordpress on Wamp, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: November 09, 2011 06:18PM

get it solved?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: mafgirl (---.ppp.as43234.net)
Date: November 09, 2011 09:23PM

Hi Steven,

No have not tried setting up a new localhost yet, not had time since this morning :-)
I currently have 11 local sites set up, but to be fair, they were all running before I got the error, so maybe I ought to try set a new one up.
Have you got any idea?

Marjolijn

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: November 09, 2011 09:26PM

I can only imagine mysql is not running for such a an error across all sites..

can you acess phpmyadmin?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: mafgirl (---.ppp.as43234.net)
Date: November 10, 2011 12:19AM

Hi Steve, yes i can access my phpmyadmin, this is how I checked my database names/users and their permissions...

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: mafgirl (---.ppp.as43234.net)
Date: November 10, 2011 04:09PM

Hello yfastud and Steve,

Have installed a new WP local site and I'm afraid I'm getting the same error.
So it CAN connect to my database which means my username and password is working, it just cannot select the database...
yfastud: I cannot use your guide for moving WP, because I always start off on my local machine before I put it online, and can also not log in to my dashboard on my local machine so therefore cannot move anything anyway.

Steve, setting up this new site has reconfirmed that phpmyadmin is DEF working, I can create new databases and new users, change settings, everything...

Any other ideas? HELP I miss being able to work on my sites off line... sad smiley

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: November 10, 2011 09:51PM

If you wanna get teamviwer again, I will take a look when your free - I really dunno why this could just statt happening smiling smiley

It's certainly an odd issue. Maybe using the SQL CLI will show us an issue

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 1 time(s). Last edit at 11/10/2011 09:52PM by stevenmartin99.

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: mafgirl (---.as13285.net)
Date: November 11, 2011 04:01PM

Hi Steven,

Yes please! I'm around all day today, then it may be tricky as I'm away abroad for work until Tuesday morning.
Interesting fact: I was checking one of my online test sites (where I put stuff online for customers, straight from my local set up) and one of the photos was linked to the local site
<img src="walberton.loc/images/image.jpg" /> rather than the live site, and the image showed (obviously only on my own machine), which means links/images stored on my local sites are actually still working..
I did a quick test in my browser which confirms this, anything other than files and I get the database error..

Marjolijn

[www.mafgirl.com]

Options: ReplyQuote
Re: localhost not able to select the database.
Posted by: stevenmartin99 (---.b-ras1.srl.dublin.eircom.net)
Date: November 11, 2011 05:52PM

Free whenever you are

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.