Create a root password for PHPMyAdmin

Daniel Montenegro picture Daniel Montenegro · Sep 1, 2012 · Viewed 389.6k times · Source

PHPMyAdmin is giving me a message saying that the user (root) does not have a password.

So, how can I create one?

Answer

flowfree picture flowfree · Sep 1, 2012

Open phpMyAdmin and select the SQL tab. Then type this command:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_root_password');

Also change to this line in config.inc.php:

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

To make phpMyAdmin prompts for your MySQL username and password.