I keep getting this error:

Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: YES) in C:\Apache Group\Apache2\htdocs\practice1.php on line 5

I have this book that told me how to fix this problem, but I cant find it anymore! It had something to do with changing my username to root or something like that. Can somebody please help me? Thanks for all your time.
-shmony

    Are you sure your root pwd is correct? Have you tried connecting to mysql from the command line to see if that works? Please post the db connect portion of the script that is giving you this error.

    If you have forgotten the root pwd you can learn how to reset it here: http://www.mysql.de/doc/en/Resetting_permissions.html

      $db = mysql_connect("localhost","root","password");
      
      mysql_select_db("members",$db);
      
      $result = mysql_query("SELECT * FROM employees",$db);

        oh! after I reset the password, my php page started working! Thanks!
        -shmony

          Write a Reply...