MySQL Workbench Administrator – GUI “Access denied for user root ” gotcha

mysql-workbench

Here is a small newbie problem I found and resolved. The behavior of the GUI is a little confusing so I figure I will share.

Running some Java examples, I have MySQL set up on Windows. After making a little progress I ran into a problem with a sample database JDBC connection. I wanted to look at that database connection's admin user info in the Workbench to see what's going on.

So I click "Users and Privileges" – the gui pops up a message:
"Access denied for user 'root'@'localhost' (using password: YES)" – what? I know the root password, set it myself. There was no opportunity to enter it in the GUI just now, only a rude popup.

So I went hunting for some tip on how to update a config file for the GUI to read the root password.

Best Answer

Long story short - the previous night I ran the Java tutorial's SQL script to set the root password. It succeeded. However the GUI was not aware of this new password value, but still it was aware that there was a password, so I got the odd message.

If you see this message in a similar case, just quit the workbench and restart, enter the changed password and all is fine.