How to fix "Access denied for user 'root'@'localhost'" for PHPMYADMIN?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atencorps
    New Member
    • Dec 2010
    • 2

    #1

    How to fix "Access denied for user 'root'@'localhost'" for PHPMYADMIN?

    Installed XAMPP

    I get

    MySQL said: Documentation
    #1045 - Access denied for user 'root'@'localho st' (using password: NO)


    I know that I am supposed to change settings in config.inc.php but having tried changing password (with and without information) I still get the error.


    I had when first installed phpmyadmin changed the password to the word biscuit but even entering the password in the config.inc.php does not work.


    I even tried changing auth type to (http) as I read some place else that should bring in the browser a page for me to enter password but i still only got the #1045 error.

    When doing all the steps I tried to stop and restart but again just getting the error.

    P.S - the sofware is installed on my Laptop as I am trying to learn PHP/MYSQL

    Below is my file

    -----

    Code:
    <?php
    /*
    * This is needed for cookie based authentication to encrypt password in
    * cookie
    */
    $cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
    
    /*
    * Servers configuration
    */
    $i = 0;
    
    /*
    * First server
    */
    $i++;
    
    /* Authentication type and info */
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'biscuit';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    
    /* User for advanced features */
    $cfg['Servers'][$i]['controluser'] = 'pma';
    $cfg['Servers'][$i]['controlpass'] = '';
    
    /* Advanced phpMyAdmin features */
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma_relation';
    $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
    $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
    $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
    $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
    $cfg['Servers'][$i]['history'] = 'pma_history';
    $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
    
    /*
    * End of servers configuration
    */
    
    /*
    * Directories for saving/loading files from server
    */
    $cfg['UploadDir'] = '';
    $cfg['SaveDir'] = '';
    
    $cfg['AllowAnywhereRecoding'] = true;
    $cfg['DefaultCharset'] = 'utf-8';
    $cfg['DefaultLang'] = 'en-utf-8';
    $cfg['DefaultConnectionCollation'] = 'utf8_general_ci';
    
    $cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.1/en';
    $cfg['MySQLManualType'] = 'searchable';
    
    ?>
    Last edited by Dormilich; Jan 15 '11, 10:06 PM. Reason: please use [code] [/code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    for some reason, the password doesn’t get send while trying to connect.

    PS. can’t remember I’d change anything in the phpMyAdmin settings when installing it on my system (although that requires me to pass the login/password each time myself).
    Last edited by Dormilich; Jan 15 '11, 10:12 PM.

    Comment

    Working...