Find the answer to your Linux question:
Results 1 to 4 of 4
Here is the error code: Code: Warning: mysql_select_db(): 5 is not a valid MySQL-Link resource in /data1/www1.ourlinux.net/bbs/sources/Drivers/mySQL.php on line 68 ERROR: Cannot find database ourlinux_net Warning: mysql_query(): 5 is not ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Aug 2004
    Location
    Houston Texas
    Posts
    192

    mysql couldn't find the database?


    Here is the error code:

    Code:
    Warning: mysql_select_db(): 5 is not a valid MySQL-Link resource in /data1/www1.ourlinux.net/bbs/sources/Drivers/mySQL.php on line 68
    ERROR: Cannot find database ourlinux_net
    Warning: mysql_query(): 5 is not a valid MySQL-Link resource in /data1/www1.ourlinux.net/bbs/sources/Drivers/mySQL.php on line 101
    Warning: mysql_error(): 5 is not a valid MySQL-Link resource in /data1/www1.ourlinux.net/bbs/sources/Drivers/mySQL.php on line 313
    The strange thing is once we refresh the browser, it will work and the error message's gone.

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284

    Re: mysql couldn't find the database?

    The most important part of the error is this:
    Warning: mysql_select_db(): 5 is not a valid MySQL-Link resource
    Check that your connection to the server was successful when calling mysql_connect(), eg, by using the "or die()" check, eg:

    $conn = mysql_connect("hostname", "username", "password") or die("Failed to connect to database");

  3. #3
    Linux Newbie
    Join Date
    Aug 2004
    Location
    Houston Texas
    Posts
    192
    Thanx jason. :P

    I will exame that. But I also have this question, if it is not connecting to the database howcome after we refresh the webpage it will work?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Aug 2004
    Location
    Houston Texas
    Posts
    192
    Code:
    mySQL query error: SELECT t.*, f.topic_mm_id, f.name as forum_name, f.quick_reply, f.id as forum_id, f.read_perms, f.reply_perms, f.parent_id, f.use_html,
                           f.start_perms, f.allow_poll, f.password, f.posts as forum_posts, f.topics as forum_topics, f.upload_perms,
                           f.show_rules, f.rules_text, f.rules_title,
                           c.name as cat_name, c.id as cat_id
                           FROM ipbtopics t, ipbforums f , ipbcategories c
                           WHERE t.tid=336 and f.id = t.forum_id and f.category=c.id
    
    mySQL error: 
    mySQL error code: 
    Date: Thursday 03rd of February 2005 01:30:48 AM
    What the ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •