Access denied for user ‘root’@’localhost’ when granting privileges

Access denied for user ‘root’@’localhost

This error always give me a headache, simply because I don’t know where to start to solve or fix this issue. This issue is not caused by not correct user authentication details because, in the first place you can login using your username and password. But when you are creating new user and granting privileges to the user, you can’t and this error shows up. Below is the instruction how to fix this:

Step one: Run the mysql_upgrade inside /installation-path/bin/. Wait until execution is finished and try to run your grant or create user script again.

Sample Output when running mysql_upgrade

Sample Output when running mysql_upgrade

jundy

R&D Supervisor && Traveller && Nature Lover

More Posts - Website

Follow Me:
TwitterFacebookGoogle PlusYouTube

Leave a Reply

Your email address will not be published. Required fields are marked *


*