Unable to select the database
-
Hi, Using Easily UK to host mySQL database. Created database using phpMyadmin. Put ‘wp-admin/install.php’ in browser but get: ‘We were able to connect to the database server (which means your username and password is okay) but not able to select the http://xxxxxxxx/username_seasonalblog database’ Previously tried database without user name prefix but same result. Any advice or idea where problem might lie? Host not much help so far.
-
Well, that doesn’t mean your database username and password are okay. Basically, here is what can cause that error in the wp-config.php file:
Database name
Database user
Database user password
Database connect (Usually this is localhost, but could need something different…you’ll need to see your host about that)Thanks! Had this from the host but not sure what to do with it and have not said to change local host. I don’t get involved with databases so all of this is pretty meaningless to me!:
QUOTE: Although we do not offer coding support, below is an ASP string which connects with the MySQL database in a “dsn-less” fashion:
%
ConnString =
“Driver={MySQL};SERVER=localhost;DATABASE=dbname;UID=xxx;PWD=yyy”
Set conn = Server.CreateObject(“ADODB.Connection”)
conn.Open ConnString
%
The only things the user has to change are the dbname(ftp username),
UID(ftp username) and PWD(ftp password). END QUOTEYeah that’s direct from their faq sheet.
DB_HOST should be ‘localhost’
But you will have to confirm the Database Name, the Database User, and the Password and put those values in wp-config.php.
We were able to connect to the database server (which means your username and password is okay) but not able to select the http://xxxxxxxx/username_seasonalblog database
This error message generally means one thing only: The DB_NAME is wrong.
Hi, Thanks for the tips Figaro, MH and Otto however HOST is set correctly, DB_NAME is the name of the DB I created – prefixed by location of DB – database username and password as supplied by Easily (same as I use to log into phpMyAdmin) but still get this. Probably a simple error but where to start. Sent this info to host but they say ‘we don’t do code’ but suggested I put the following into config; but where? Thanks again, here is the suggested code:
%
ConnString =
“Driver={MySQL};SERVER=localhost;DATABASE=dbname;UID=xxx;PWD=yyy”
Set conn = Server.CreateObject(“ADODB.Connection”)
conn.Open ConnString
%
The only things the user has to change are the dbname(ftp username),
UID(ftp username) and PWD(ftp password).DB name WILL NOT HAVE http info in it.
Also forget about that connect string, the only thing useable from that is the SERVER=localhost.
Thanks. Did try without connect string and got the same message? Cheers.
This much we know to be true:
define('DB_HOST', 'localhost');your DB_NAME could be something like
define('DB_NAME', 'seasonblog');But that’s a total guess…
DB_NAME is the name of the DB I created – prefixed by location of DB
Don’t “prefix” anything. The name of the DB is the name of the DB. It should not have any extra info.
Given this:
ConnString = "Driver={MySQL};SERVER=localhost;DATABASE=dbname;UID=xxx;PWD=yyy" Set conn = Server.CreateObject("ADODB.Connection") conn.Open ConnStringThe DB_NAME would be “dbname”.
Thanks guys. You are right the DB_NAME has no prefix or suffix it is the username and only the username. But when I use that in WP-config.php I get:
“Fatal error: Call to undefined function: wp_remote_post() in /customersites/3/home/httpd/vhosts/theseasonallunchbox.com/httpdocs/blog/wp-includes/cron.php on line 201”
Whereas when I used the other settings at least I got a WP response which to my simple logic is a better error message than this new one; but I have a horrible feeling I am being very dumb here but the hosts contradict themselves and really give no help even on setting up a database let alone WP where the advice has been try Yahoo or Google.
this error is better in that now at least you are connecting to the db
Call to undefined function almost always means some of the files didn’t get uploaded. I would upload the contents of the /wp-includes folder again.
Hi again, thanks for all the tips, finally got the host to look into this andwas a problem their end …. however they do not support mySQL 4 so a dead end it looks like even if I dump 2.7 and go back a few steps!
Get a new host then!
Too right! On the case. With my other host totalwebsolutions.com (uk) to set up WP on http://www.stengard-green.com was a 5 minute job and great technical support to correct one error on my part. Easy, unlike easily.co.uk; the ‘UKs friendlyist (sic) host’. Thanks again to everyone who contributed / commented. Sorry to waste your time. Cheers. Nigel
The topic ‘Unable to select the database’ is closed to new replies.