error please help Access denied for user ''@'localhost' to database '

Discussion in 'MySQL' started by scriptsy26, Jun 15, 2010.

  1. #1
    Hello,

    Access denied for user '####'@'localhost' to database '#####

    I seem to have a error with reaching and communicating with my database.
    i have tried everything by changing passwords and usersname and database names.

    Can someone help me with this. what am i doing wrong.

    if i check database in cpanel then everything works oke.

    here is an example config.php

    <?
    ob_start();session_start();
    $hostname = "localhost"; //your hostname (normally localhost)
    $data_username = "supertok_admin"; //database username
    $data_password = "hoekerhof50"; //database password
    $data_basename = "supertok_dutchy"; //database name
    $conn = mysql_connect("".$hostname."","".$data_username."","".$data_password."");
    mysql_select_db("".$data_basename."") or die(mysql_error());
    $bonuspoints=10; //bonus points awarded for new users
    $mainpointsneeded=200; //max number of points needed before user can request voucher
    ?>
     
    scriptsy26, Jun 15, 2010 IP
  2. extremephp

    extremephp Peon

    Messages:
    1,290
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, i could help you out... :)
    Contact me once you are online...

    A reply here wont notify me coz, i dont usually take a list of threads i visit, since i visit a lot :D
    Thanks.
     
    extremephp, Jun 15, 2010 IP