#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2005
    Posts
    8
    Rep Power
    0

    problem with mysql


    Hi,

    I have installed Apache, Php, Mysql, and phpmyadmin. At the end I wanted to check if phpmyadmin goes well by entering http://localhost/phpmyadmin/index.php. But it appeared that there was an error like this:
    Error
    MySQL said:
    Access denied for user: 'root@127.0.0.1' (Using password: YES)

    Can anybody tell me what it is, and how to fix it.
    Thank you very much indeed.

    I have already configured config.inc.php in phpmyadmin as following:
    $cfgServers[1]['host'] = 'localhost';
    $cfgServers[1]['user'] = 'root';
    $cfgServers[1]['password'] = 'password';

    thanx a lot
  2. #2
  3. At night, the ice weasels come
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2005
    Posts
    1,047
    Rep Power
    58
    This is a MySQL issue not a PHP issue. And you should change your subject line because when you try to use a URL is displays as ...
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    356
    Rep Power
    13
    did you try to access the mysql server through the command line client?
    does it work there?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2005
    Posts
    8
    Rep Power
    0
    Originally Posted by busmaster
    did you try to access the mysql server through the command line client?
    does it work there?
    what do you mean?? sorry, I am just a beginner
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    356
    Rep Power
    13
    ok,
    where have you installed mysql?
    we will assume c:\mysql
    got to c:\mysql\bin using the command prompt.
    then type "mysql -u root -p"
    it will ask you for your password. enter it. if it does notwork, then either
    1. your mysql server is not running
    2. your password is wrong.

    to check your mysql server, type "net start mysql" in the command prompt.
    if it says, service already started, well and good, else it will start the service.
    then try the above command again.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2005
    Location
    /home/eddie/.secret
    Posts
    273
    Rep Power
    13
    Why do people think that if they have a problem it belongs in the PHP section?

    Comments on this post

    • busmaster agrees : good point :)
    • hope.sandoval agrees : I think it will be my new policy to not help on questions that are in the wrong forum.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2005
    Posts
    8
    Rep Power
    0
    yes, but when I typed c:\mysql\bin it was written : it is not recognized as an internal or external command, operable program or batch file.
    I am sure I have mysql in c:\mysql
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Davie, FL
    Posts
    100
    Rep Power
    0
    try this, instead of saving the user and pass for mysql in the config file so anyone can open it and have access to your db, change the auth_type to cookie
    $cfg['Servers'][$i]['auth_type'] = 'cookie';

    then you can type in your mysql user and pass.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2005
    Posts
    8
    Rep Power
    0
    Hura! it works, thank you very much
  18. #10
  19. (retired)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2003
    Location
    The Laboratory
    Posts
    10,101
    Rep Power
    0
    One little comment: unlike most things, MySQL thinks localhost and 127.0.0.1 are different locations. Therefore, if the user root@localhost has permissions, but root@127.0.0.1 doesn't then you need to use root@localhost (or grant the privs. to root@127.0.0.1).

    --Simon

    Comments on this post

    • busmaster agrees : good piece of info.

IMN logo majestic logo threadwatch logo seochat tools logo