Document written Friday, 8 October 2010
When something is a pain, I should document the solution.
My installation of WAMP on Windows 7 came up with the following 2 red lines in phpMyAdmin.
The additional features for working
with linked tables have been
deactivated. To find out why click
here.
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Getting rid of the first lot of red text in 3 minutes
From Home
in phpMyAdmin, click the Import tab and then click Browse and paste the following location in the filename box.
C:\wamp\apps\phpmyadmin3.2.0.1\scripts , and then select “create_tables.sql” and click “go”.
Open the MySQL console from the WAMP menu and hit enter.
When you are logged on, paste in the next two lines.
CREATE USER ‘phpmyadmin’@'localhost’ IDENTIFIED BY ‘pmapass’;
GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO ‘phpmyadmin’@'localhost’;
Open WordPad and click Open Document. Paste in the following text to open the file.
C:\wamp\apps\phpmyadmin3.2.0.1\config.inc.php
Then delete the contents between the PHP tags and paste in the following text.
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* 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';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
Click Save!
Close your browser and open it again, if the error is still there, click refresh and it will be gone.
Getting rid of the second lot of red text
Now set the security for MySQL and get rid of the other error.
If it's open, then close phpMyAdmin.
Open MySQL console from WAMP menu and paste the following two lines.
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('**yourpassword**');FLUSH PRIVILEGES;
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('**yourpassword**');FLUSH PRIVILEGES;*
Hit Enter!
Open “config.inc.php” again and change the following line to enable the same password as above.
$cfg['Servers'][$i]['password'] = '**yourpassword**';
You’re done! Open phpMyAdmin and your red warning text will be gone!