I remoted into my moodle server and connected to MySQL using phpMyAdmin. I opened the mysql db and then the user table, which holds the user accounts for the database, not the moodle db, but the actual MySQL table that holds the users and their privileges that moodle config.php file uses to establish connection with the db.
After I modified the privileges for the root user, I closed phpmyadmin and opened it again. Oops, I realized I must have been using the root user as the default connection, since I could no longer see the moodle db.
How do I change the user phpmyadmin is connecting with?
I opened the wamp\apps\phpmyadmin3.4.10.1\config.inc.php file. This post helped me to find the configuration file.I edited the user and password, adding a user created with proper permissions and saved the file changes and closed phpmyadmin and launched it again. I had to press Ctrl F5 to force a fresh reload of the config. file. I was back in connected as my updated user and could see the moodle DB again.
I opened the users table again and scaled back the privileges of the other user account in the table.
Moral of the story?
- Know where the phpmyadmin configuration file is
- Be careful when removing privileges from an account
- Edit the mysql user table to view and update user privileges
No comments:
Post a Comment