2

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?

Rick James
80.7k5 gold badges52 silver badges119 bronze badges
asked May 5, 2016 at 6:16
3
  • Please send the output of below queries: select user,host from mysql.user; and show grants for root@'%'; Commented May 5, 2016 at 12:28
  • 1
    Possible duplicate of How to securely connect app and database servers? Commented Oct 6, 2017 at 21:21
  • @Geetanjali that does seem like a leak of personal information. I would probably just suggest how the asker could use that information to tell how that would be helpful for diagnosis Commented Jul 29, 2018 at 23:41

1 Answer 1

0

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.

answered Apr 9, 2017 at 12:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.