2013-07-30

phymyadmin error #1045 when mysql password changed in easyphp wamp server

Easyphp is an easy to setup wamp server for development purposes. However, it's default
configuration is very insecure; the MySQL root password is left blank.
We can easily use the built-in phpmyadmin to change the password for root.
Just go to the [Users] tab. Select the root user and click the Edit Privileges.
Enter the password and confirmation, and press Go.
You need to do this for all the root@ listed.



However, once you change the mysql address, you will find that
the phpmyadmin throws a 1045 error when you refresh the page.
You need to go to the easyphp\modules\phpmyadmin directory.
Look for the config.inc.php file

Here are the changes you need to make to the config.inc.php
# change the authentication type from config to cookie
#$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['auth_type'] = 'cookie';

# change this line from the default true to false
#$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

This will make the phpmyadmin prompt you for the root userid / password
every time you use the phpmyadmin.

This is safer than putting the root userid and password
in the config file, because anyone with the phpmyadmin
URL would then have have root privileges without login in.
(this is the default setting in phpmyadmin; which you should change)

No comments:

Post a Comment

Github CoPilot Alternatives (VSCode extensions)

https://www.tabnine.com/blog/github-copilot-alternatives/