#1045 cannot log in to the mysql server - PhpMyAdmin

Discussion in 'Web Design and Development' started by lukaz32, Sep 14, 2011.

  1. macrumors newbie

    Joined:
    Sep 14, 2011
    #1
    I don't know what else to try, I just can't get this working. I open the login page of phpmyadmin trying to log in as root an it keeps giving me the message "#1045 Cannot log in to the MySQL server"

    I try to set a new password to root by typing:


    /usr/local/mysql/bin/mysqladmin -u root password NEWPASSWORD

    and it gives me:

    /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    I think that it might be missing some extra configs. in my php.ini

    Can anyone help me out?
     
  2. macrumors 65816

    Joined:
    Jun 18, 2010
    #2
    Take a look at http://hintsforums.macworld.com/showthread.php?t=58057 there seems to be some good info in there.
     
  3. macrumors 6502a

    Joined:
    Apr 1, 2007
  4. macrumors 6502

    Joined:
    Jan 27, 2009
    #4
    Take a look at the config.inc.php file in the phpMyAdmin directory.
    You can set the password there.
     
  5. macrumors newbie

    Joined:
    Dec 5, 2012
    #5
    Modify Configuration in config.inc.php

    First Rename the configuration file name from config.sample.inc.php to config.inc.php

    Then change the line:
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    to:
    $cfg['Servers'][$i]['AllowNoPassword'] = true;

    hope this helps.
     

Share This Page