Results 1 to 3 of 3

Thread: mySQL connection error

  1. #1
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default mySQL connection error

    I am so stupid that I created a new database via cPanel for my website and accidentally gave it the same username as the main database for my ecommerce database. Now I cannot login to my admin and my site doesn't come up. I get this error message

    [CODE]Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'willowtr_jennic'@'localhost' (using password: YES) in /home/willowtr/public_html/include/db_mysql.php on line 47

    There seems to have been a slight problem with the database. Please contact the server admin to report this problem.[CODE]

    I have absolutely no idea how to fix this and I am so stressed out and crying. Please can someone help me. I deleted the new database I created but it has made no difference.

    Please I need help so fast. Thank you.

    Jenni

  2. #2
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Resolved

    After an hour of stress and tears I resolved it. The new database had simply overwritten my password in config. These little things are sent to try us. Especially us idiots.

    Thanks anyway,

    Jenni

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I have two different databases and both have the same username as the database name and they both work fine. They look something like:

    PHP Code:
    $conn mysql_connect("hostname""[ICODE]john[/ICODE]""password") or die(mysql_error());
    mysql_select_db("[ICODE]john[/ICODE]",$conn) or die(mysql_error()); 
    I might be misunderstanding though.
    To choose the lesser of two evils is still to choose evil. My personal site

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
  •