Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011

    Red face Unanswered: Access Denied - connecting to mysql using PHPmyadmin

    Not sure if this is the right place to post this, but yea.

    The error I got is
    HTML Code:
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /Applications/XAMPP/xamppfiles/htdocs/helloworld.php on line 2
    Access denied for user 'root'@'localhost' (using password: YES)

    My PHP script is
    PHP Code:
    ("localhost""root""password") or die(mysql_error());
    "Connected to MySQL<br />";
    mysql_select_db("helloworlddatabase") or die(mysql_error());
    "Connected to Database";

    Attached is what i have on PHPMyadmin > user privileges tab.
    I have created another user "thian" which also has global privilege to this helloworlddatabase, and the same error pops up.

    Please tell me what is wrong here...
    Attached Thumbnails Attached Thumbnails Picture 2.png  

  2. #2
    Join Date
    Nov 2011
    oOPS, this is resolved...
    Up to databases instead of helloworlddatabase, and the user's privilege tab shows password : no. So I edited my PHP script and make it without password then voila!

Posting Permissions

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