Trouble Configuring Password for MySQL

Discussion in 'Programming' started by goldenwaters, Apr 20, 2012.

to remove all ads.
  1. goldenwaters

    goldenwaters Member

    Messages:
    114
    Hello friends,
    im not that perfect in php yet. However, i encountered a problem: when i connected to database using this-
    mysql_connect($localhost, $root, $password); i saw an error message that "access denied" and my [default] password is "yes". Please friends, how do i configure it so it runs without hitches.
     
  2. WAYNEWEX

    WAYNEWEX New Member

    Messages:
    6
    Are you sure that you've set a password?

    If this is a default installation, your details will be "localhost", "root", ""

    i.e. there is no password by default.

    mysql_connect("localhost", "root", "");
     
  3. goldenwaters

    goldenwaters Member

    Messages:
    114
    Thanks bro, you are correct. I have found a way out. My password should have been this: $password = ""; and i wrote this: $password = " "; it has been resolved.

    Thanks,
    Golden Waters
     

Share This Page