Mysql – Could not connect to the specific instance. MySQL error number 1045. Access denied for user ‘root’@’the public ip’ (using password:YES)

MySQL

I was using MySQL query Browser in my system and type the IP address of the remote Server and log in. I tried to create a store procedure and scheduled an event to call the procedure every two minutes. I got the error "Access denied for user 'root'@'%'". To solve this error I tried the below queries.

GRANT ALL PRIVILEGES ON database.* TO 'root'@'%' IDENTIFIED BY 'PWD';
FLUSH PRIVILEGES; 
SHOW GRANTS FOR 'root'@'%  
select * from mysql.user where User='root';

Now after executing these queries the error was solved and the event scheduler worked.

But now I am unable to login using the query browser in my system. I am getting another error when I try to login using the query browser from my system.

The error I am getting when I try to login using the query browser from my system is this –> "Could not connect to the specific instance. MySQL error number 1045. Access denied for user 'root'@'my public ip' (using password:YES)". How can I solve this error?

Best Answer

1) 'my public ip' is this ip allowed to connect your mysql server? note : i know you have allowed from everywhere '%' but better to check again, whether your server ('my public ip') is allowed to connect to mysql server

2) If 1st is ok then please check your password. Looks like something wrong with the password (typo, or copy issue etc).

Hope this helps.