MySQL on Windows - Access denied for user ''@'localhost' - cannot connect from any host
I tried to update my Mysql instance to support remote access. I went to MySQL Administration UI and added % (any host) for user root and removed all other entries.
Now I cannot a开发者_如何学运维ccess MySQL as root from any machine including localhost. What is the best way to fix this?
- Stop MySQL server
- Restart it on the command line, skipping authorizations:
mysqld.exe --skip-grant-tables
- Fix your permissions (add both a
localhost
and a127.0.0.1
record for root to the mysql.user table) - Stop MySQL server
- Start MySQL normally
精彩评论