#1045 cannot log in to the mysql server - PhpMyAdmin

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

  1. lukaz32 macrumors newbie

    Sep 14, 2011
    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. Laird Knox macrumors 68000

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


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

    Dec 5, 2012
    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;
    $cfg['Servers'][$i]['AllowNoPassword'] = true;

    hope this helps.

Share This Page