1

I am getting in phpMyAdmin the famous #1045 error: Access denied for user 'root'@'localhost' (using password: YES).

This is my /etc/phpmyadmin/config.inc.php:

/** * Server(s) configuration */ $i = 0; // The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. // You can disable a server config entry by setting host to ''. $i++; /* Authentication type */ //$cfg['Servers'][$i]['auth_type'] = 'cookie'; /* 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'] = 'mysql'; /* Optional: User for advanced features */ // $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass'; /* Optional: 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'] = ''; 

Any idea?

1
  • Have you configured your root password for MySQL during installation? Do you have MySQL listening on a unix socket? Commented Jul 20, 2010 at 2:44

3 Answers 3

3

You realize all the configuration lines are commented out? You need to uncomment and fill-in those fields for anything to happen. I think including this one would be sufficient (assuming you want it to prompt you for a username/password):

$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
0

execute following command

$ mysqladmin -u root password abcd

and use the password in config file as 'abcd'

or replace your password with 'abcd'

0

Uncomment the below lines and fill the correct info:

$cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['host'] = 'localhost'; /* Optional: User for advanced features */ $cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = ''; /*You can leave it blank, PHPmyadmin will ask you the user name and password */ 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.