How to change root password to MySQL and PHPMyAdmin

Pinterest LinkedIn Tumblr

How to change root password to MySQL and PHPMyAdmin

You can change the MySQL root password by logging in to the database directly (MySQL -h your_host -u root) then run

SET PASSWORD FOR [email protected] = PASSWORD(your password’);

PHPMyAdmin should use that password so not quite sure what you mean by “for both”.

Make sure to set the new password into phpmyadmin’s too, at line

$cfg[‘Servers’][$i][‘password’] = ‘yourpassword’;

Otherwise, phpmyadmin may not work, echoing

Access denied for user ‘user’@’localhost’ (using password: YES)

Write A Comment