3

I am attempting to connect to a remote MySQL DB from a virtual machine (Ubuntu, running on Azure).

When I access the DB from my computer via the command line, I enter:

mysql -u username -h www.foobar.nyc -p

Which prompts me for the password. When I enter the password, it successfully logs me in to the remote db.

Now when I perform the same actions as above, but instead from a remote vm that I have ssh into, I get the following error returned after entering my pw.

ERROR 1129 (HY000): Host 'xxx.xx.xxx.xxx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Googling this error brings me to: http://dev.mysql.com/doc/refman/5.7/en/blocked-host.html

I'd like to understand why I am getting so many connection errors - is that normal? Is there a setting perhaps with Azure that I need to look into? I know Azure has the endpoints manager. When using the Python mysql library, it reads that errors occurring File "/site-packages/mysql/connector/connection.py", line 418, in _open_connection on self._do_handshake()

What I hope to gain from this question:

  1. Understand why "many" errors are occurring - what is causing this and is receiving such high numbers of errors normal (as some comments in the MySQL documentation I linked to appear to suggest).

  2. Understand the differences that enable the same actions to work from local in command line but not from command line when ssh into remote Azure based vm.

Thanks.

Will Shao - MSFT
  • 1,189
  • 7
  • 14
kuanb
  • 1,618
  • 2
  • 20
  • 42
  • Just created a new VM and am not experiencing the same issues - so I believe the issue is that the Host is my vm, which has been blocked by the MySQL server that I am attempting to connect to. So the suggestion that I see to `unblock with 'mysqladmin flush-hosts'` is to be executed on the vm that is running the MySQL db in order to allow me to gain access to it from my Azure vm. If someone wants to confirm that this is the correct interpretation of events (fairly certain it is), happy to select that as the answer. – kuanb Dec 01 '15 at 20:27

1 Answers1

1

1.Understand why "many" errors are occurring - what is causing this and is receiving such high numbers of errors normal (as some comments in the MySQL documentation I linked to appear to suggest).

Per my experience, you can check the mysql error logs, details on enabling error logs are @ How to see log files in MySQL?.

2.Understand the differences that enable the same actions to work from local in command line but not from command line when ssh into remote Azure based vm.

Based on the latest comment you provided, the new created VM was not experiencing the same issue, it may not be an azure platform specific related issue.

Community
  • 1
  • 1
Ming Xu - MSFT
  • 2,116
  • 1
  • 11
  • 13