1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to fix this error?

Discussion in 'PHP' started by Gravereaper, Nov 29, 2006.

  1. #1
    I'am learning PHP easily but heres a problem:
    'Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\xampplite\htdocs\test\test.php on line 2
    Could not connect: Access denied for user 'ODBC'@'localhost' (using password: NO)'

    How can i fix it?
     
    Gravereaper, Nov 29, 2006 IP
  2. ThomasNederman

    ThomasNederman Peon

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check that you are using the correct username. i dont think user ODBC exist, and normaly you should have a password.

    if you look in the file "function.mysql-connect" you can probably find some lines like
    $mysql_user = "";
    $mysql_pass = "";
    $mysql_host = "localhost";

    if you change the parameters it will probably work
     
    ThomasNederman, Nov 29, 2006 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #3
    EDIT: A few seconds too late...

    The username and/or password you're using to access the database is/are incorrect.
     
    nico_swd, Nov 29, 2006 IP
  4. Gravereaper

    Gravereaper Banned

    Messages:
    450
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I tried searching for this file but can't find it, where is this file exactly? ( i'am using xampplite for now )
     
    Gravereaper, Nov 29, 2006 IP
  5. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #5
    If you're using XAMPP, then the username is probably "root", and the password is blank.
     
    nico_swd, Nov 29, 2006 IP
  6. Gravereaper

    Gravereaper Banned

    Messages:
    450
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok that login worked but now when i try to create a database it throws up this error:
    Could not connect: Host 'MYHOST' is not allowed to connect to this MySQL server
     
    Gravereaper, Nov 30, 2006 IP
  7. adsblog

    adsblog Active Member

    Messages:
    659
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #7
    Learn more about connecting to mysql server : function.mysql_connect
    now you can control this error :
    Good Luck
     
    adsblog, Nov 30, 2006 IP
  8. Gravereaper

    Gravereaper Banned

    Messages:
    450
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Maybe i've got the codes right but it has something to do with security access, for being a PHP beginner i have no clue how to edit it.. thou i've tried your codes and its still shooting up the same error
     
    Gravereaper, Nov 30, 2006 IP