I was in there today with an eye toward improving security.
Looking at the default root user that the system creates upon creation of the software, i noticed there was no password set. I decided it was a good idea to add a password to the root user account.
After I had completed this operation and then tried to edit the other root account, or tried to access phpMyAdmin from the wamp home page, I could not. Opps. I was getting this error message.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
It made sense, in hindsight, that I had changed the credentials of the root or default account that phpMyAdmin used for connection. I could understand the message, indicating that phpMyAdmin was not able to connect. This did not effect my moodle connection, as i am using a different user to connect to moodle. Still, this was a problem, as I plan to use phpMyAdmin to do as much of my db administration as possible.
I had to find the configuration file for phpMyAdmin, and add the password that I set while editing the account. It took me about 15 minutes to just find where the phpMyAdmin software was located inside the Wamp setup. Here is the location
c:\wamp\apps\phpmyadmin
Next, I had to find the file. I looked first in the index.php file but did not find what i was looking for, some type of connection variable. I looked for a file called connect or connection to no avail. Finally, I searched the error code and found on this forum, the file where this setting is located.
The file is config.inc.php
I opened the file and found the variable for the connection password set to ''. I added my password to the file, saved it and was immediately able to connect again to phpMyAdmin.
Moral of the story?
Be careful when messing with root account permissions.
No comments:
Post a Comment