"Unknown database 'leave' " Could there be anything in mysql that i might have done wrong that triggers the error? or maybe there is a problem in my $con object in the 1st place? Help is much appreciated thanks [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1185337811.123229.195640@x35g2000prf.googlegroups.com> [ref] => [htmlstate] => on_nl2br [postusername] => scout3014@gmail.com [ip] => scout3014@gmail [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> > "Unknown database 'leave' " > > Could there be anything in mysql that i might have done wrong that > triggers the error? or maybe there is a problem in my $con object in > the 1st place? > > Help is much appreciated > > thanks[/ref] Th bit I don't understand is why the error message refers to "leave" whilst the db select call is for "Leave"? [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1185351202.298831.145980@q75g2000hsh.googlegroups.com> [ref] => <1185337811.123229.195640@x35g2000prf.googlegroups.com> [htmlstate] => on_nl2br [postusername] => Captain [ip] => paul_lautman@ya [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > > "Unknown database 'leave' "[/ref] >[ref] > > Could there be anything in mysql that i might have done wrong that > > triggers the error? or maybe there is a problem in my $con object in > > the 1st place?[/ref] >[ref] > > Help is much appreciated[/ref] >[ref] > > thanks[/ref] > > Th bit I don't understand is why the error message refers to "leave" > whilst the db select call is for "Leave"?- Hide quoted text - > > - Show quoted text -[/ref] i dont understand it myself. Because in my SQLiteManager my database is named "Leave", but i am not ruling out the possibility that certain configurations in e SQLite may hav sth to do with tis. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1185353009.004857.287470@x35g2000prf.googlegroups.com> [ref] => <1185337811.123229.195640@x35g2000prf.googlegroups.com><1185351202.298831.145980@q75g2000hsh.googlegroups.com> [htmlstate] => on_nl2br [postusername] => scout3014@gmail.com [ip] => scout3014@gmail [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> unable to connect to mysql database in Wamp5 - MySQL
Professional Web Applications Themes

unable to connect to mysql database in Wamp5 - MySQL

Hi I am currently doing a web project using wamp5. Right now this is how i am connecting to the database: $con = mysql_connect("localhost", "root", ""); if (!con) { die('Could not Connect' . mysql_error()); } if (!mysql_select_db("Leave", $con)){ die (mysql_error()); } else { ........ } When the code above is activated, this is the result: ---> "Unknown database 'leave' " Could there be anything in mysql that i might have done wrong that triggers the error? or maybe there is a problem in my $con object in the 1st place? Help is much appreciated thanks...

  1. #1

    Default unable to connect to mysql database in Wamp5

    Hi

    I am currently doing a web project using wamp5. Right now this is how
    i am connecting to the database:


    $con = mysql_connect("localhost", "root", "");
    if (!con) {
    die('Could not Connect' . mysql_error());
    }
    if (!mysql_select_db("Leave", $con)){
    die (mysql_error());
    }
    else {
    ........
    }

    When the code above is activated, this is the result: --->
    "Unknown database 'leave' "

    Could there be anything in mysql that i might have done wrong that
    triggers the error? or maybe there is a problem in my $con object in
    the 1st place?

    Help is much appreciated

    thanks

    scout3014@gmail.com Guest

  2. #2

    Default Re: unable to connect to mysql database in Wamp5

    On 25 Jul, 05:30, com wrote: 

    Th bit I don't understand is why the error message refers to "leave"
    whilst the db select call is for "Leave"?

    Captain Guest

  3. #3

    Default Re: unable to connect to mysql database in Wamp5

    On Jul 25, 4:13 pm, Captain Paralytic <com> wrote: 








    >
    > Th bit I don't understand is why the error message refers to "leave"
    > whilst the db select call is for "Leave"?- Hide quoted text -
    >
    > - Show quoted text -[/ref]

    i dont understand it myself. Because in my SQLiteManager my database
    is named "Leave",
    but i am not ruling out the possibility that certain configurations in
    e SQLite may hav sth to do with tis.

    scout3014@gmail.com Guest

  4. #4

    Default Re: unable to connect to mysql database in Wamp5

    On Wed, 25 Jul 2007 10:43:29 +0200, <com> wrote: 
    > i dont understand it myself. Because in my SQLiteManager my database
    > is named "Leave",
    > but i am not ruling out the possibility that certain configurations in
    > e SQLite may hav sth to do with tis.[/ref]


    RTFM:
    9.2.2. Identifier Case Sensitivity
    In MySQL, databases correspond to directories within the data directory.
    Each table within a database corresponds to at least one file within the
    database directory (and possibly more, depending on the storage engine).
    Consequently, the case sensitivity of the underlying operating system
    determines the case sensitivity of database and table names. This means
    database and table names are not case sensitive in Windows, and case
    sensitive in most varieties of Unix.

    ............

    How table and database names are stored on disk and used in MySQL is
    affected by the lower_case_table_names system variable, which you can set
    when starting mysqld. lower_case_table_names can take the values shown in
    the following table. On Unix, the default value of lower_case_table_names
    is 0. On Windows, the default value is 1. On Mac OS X, the default is 1
    before MySQL 4.0.18 and 2 as of 4.0.18.

    Value Meaning
    0 Table and database names are stored on disk using the lettercase
    specified in the CREATE TABLE or CREATE DATABASE statement. Name
    comparisons are case sensitive. Note that if you force this variable to 0
    with --lower-case-table-names=0 on a case-insensitive filesystem and
    access MyISAM tablenames using different lettercases, this may lead to
    index corruption.
    1 Table names are stored in lowercase on disk and name comparisons are not
    case sensitive. MySQL converts all table names to lowercase on storage and
    lookup. This behavior also applies to database names as of MySQL 4.0.2,
    and to table aliases as of 4.1.1.
    2 Table and database names are stored on disk using the lettercase
    specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL
    converts them to lowercase on lookup. Name comparisons are not case
    sensitive. Note: This works only on filesystems that are not case
    sensitive! InnoDB table names are stored in lowercase, as for
    lower_case_table_names=1. Setting lower_case_table_names to 2 can be done
    as of MySQL 4.0.18.
    --
    Rik Wasmus
    Rik Guest

Similar Threads

  1. Unable to connect to SQL Server database
    By James in forum ASP.NET Security
    Replies: 4
    Last Post: October 6th, 06:45 PM
  2. Unable to connect to database via webservce
    By Saira in forum ASP.NET Web Services
    Replies: 5
    Last Post: February 23rd, 05:55 AM
  3. Unable to connect to SQL server database
    By toby007 in forum Coldfusion Server Administration
    Replies: 1
    Last Post: March 15th, 01:41 PM
  4. Unable to connect to MSAccess database
    By Joe Abou Jaoude in forum ASP Database
    Replies: 2
    Last Post: April 19th, 11:17 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139