I can connect to a MySQL server through a browser and also I can show all database list through PuTTY. But when I try to use sqlyog or running the mysqldump command through PuTTY it shows this error:

ERROR NO:2003 cannot connect to mysql server on "****"

How I give these tools permission?

I use this command

mysqldump -h "1st IP Address" -u username -ppasswprd DB Name | mysql -h "2nd IP Address" -u username -ppasswprd DB Name

I get that ERROR

mysqldump: Got error: 1130: Host '2nd IP Address' is not allowed to connect to this MySQL server when trying to connect
  • 1
    The number in parentheses at the end of the error (not included in your question) is critical for understanding the specific reason why you can't connect. It may not be "permission" related. – Michael - sqlbot Sep 26 '14 at 10:48
  • Perhaps if you shared the command (with ip/pass redacted) – Grizly Sep 30 '14 at 5:05
  • Please check I edited my question – user3676417 Sep 30 '14 at 7:02
  • Your user has the access granted for the database? grant all priviliges on *.DBNAME to user@2ndipaddress identified by "password" ? – patricks Sep 30 '14 at 7:11
  • I already tried that but no luck – user3676417 Sep 30 '14 at 7:18

Looks like you need to GRANT access to the database

GRANT priva on database.* to user@ip

for example


You can also add IDENTIFIED BY 'password'

if you want to also add a password for the user in the same step. Obviously this is performed on the database on "1st ip address" giving "2dn ip address" after the @.

  • Or maybe vice-versa, now that you edit the question. :) – user3241388 Sep 30 '14 at 7:12
  • GRANT privilege didnot accept by AMAZON RDS. GRANT privilege is only accepted on root user – user3676417 Sep 30 '14 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.