Posted on: 08/06/03 06:34pm
By: Anonymous (ewen)
This is what I get on my screen. What does it mean? How do i fix it?
error selecting database
Re:error selecting database
Posted on: 08/07/03 12:20am
By: Anonymous (xlord)
It means that you didnt add your db name in config.php or.. you misspelled it wrong or something
Re:error selecting database
Posted on: 08/12/03 01:55pm
By: Anonymous (ewen)
Is there someway, other then running the script, to make sure that the database is working properly?
I believe that I spelt the name correctly (I copied and pasted it from phpMyAdmin) but I will double check it.
Let\'s, for a second, assume that it is spelt correctly. Is there anything else that could casuse this? The database, because it is on a virtual server, has a really funny name, like 123_com_-_dbname, could that be causing the problem?
Thanks for the help.
Re:error selecting database
Posted on: 08/12/03 02:27pm
By: DTrumbower
Either db name is wrong or the username does not access.
You could try this in a separate file.
$dbcn = @mysql_connect(\"servernam\", dbuser\", \"userpassword\" );
IF (!$dbcn){
echo(\"<p>Unable to login</p>\");
exit();
}
$dbcn = @mysql_select_db(\"dbname\");
IF (!$dbcn){
echo(\"<p>Unable to connect to database.</p>\");
exit();
Change the servername, username, userpassword and dbname.