MySQL User Access Denied
Recently I have tried to set up MySQL Database with a new user and I ran into some issues.
No matter what I do it seems that this user does not have access to connect to MySQL database through MySQL Workbench. I have given permissions to access 127.0.0.1 and I double checked the password.
4 Replies
Once you have created your user and given them the desired privileges you'll need to flush privileges in order for the changes to take effect.
You can do this with the following command from the SQL command prompt:
mysql> FLUSH PRIVILEGES;
For more information on Adding SQL Users, see the SQL Guide
Thanks! Though I’ve done that.
Followed the Linode hosting a website guide which I’ve done a couple of times on other servers I have and haven’t had a issue connecting through sql workbench. Maybe something in MySQL has chanaged?
Also, interestingly, despite setting a root MySQL password, I can login to the MySQL console as root with no password.
Never had this before.
The Access denied error message tells you who you are trying to log in as, the client host from which you are trying to connect, and whether you were using a password. … If you get an Access denied error when trying to connect to the database with mysql -u user_name , you may have a problem with the user table.
Once you have given the desired privileges for your user, you will need to FLUSH privileges in order to complete the setup and to make the new settings work.
To do so, run this command within the SQL command prompt: mysql> FLUSH PRIVILEGES;