Welcome to Geeklog, Anonymous Saturday, June 15 2024 @ 06:29 am EDT

Geeklog Forums

error selecting database


ewen

Anonymous
This is what I get on my screen. What does it mean? How do i fix it? error selecting database
 Quote

xlord

Anonymous
It means that you didnt add your db name in config.php or.. you misspelled it wrong or something
 Quote

ewen

Anonymous
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.
 Quote

Status: offline

DTrumbower

Forum User
Moderator
Registered: 01/08/03
Posts: 507
Either db name is wrong or the username does not access. You could try this in a separate file.
Text Formatted Code
$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.
 Quote

All times are EDT. The time is now 06:29 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content