3.10. Troubleshooting phpMyAdmin

When you test phpMyAdmin, you might see an error message similar to the one shown in Figure 3-8.

This error message states that phpMyAdmin access to the MySQL server is denied to the user specified in the phpMyAdmin configuration file. In most cases, the problem is an incorrect account name or password.

Notice that the error message in Figure 3-8 includes a small question mark (?) after the heading. If you click the question mark, the appropriate MySQL documentation page opens.

You can see what your current account name and password are by viewing the config.inc.php file located in the phpMyAdmin directory.

Figure 3-8. A phpMyAdmin Error Message.

Open the configuration file in a text editor. Scroll down to the section for your server that looks similar to the following:

/* Servers configuration */
$i = 0;

/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'secret';

/* End of servers configuration */

Check that the parameters are correct. The account name in this ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.