Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to run command "mysqladmin flush-hosts" on Amazon RDS database Server instance?

I got a database server failure, says host is blocked because of many connection errors. It ask me to unblock with 'mysqladmin flush-hosts'

how and where should I run this command to our amazon rds database server?

thank you

like image 679
user955461 Avatar asked Nov 04 '11 18:11

user955461


People also ask

Is blocked because of many connection errors unblock with Mysqladmin flush hosts?

Host is blocked because of many connection errors. Unblock with mysqladmin flush hosts" is a database side error and occurs due to multiple connections created while connecting the database. To resolve the above error, you need to execute "Flush hosts " command.


2 Answers

For normal MySQL, just connect as the 'root' administrative super user, and issue the command:

FLUSH HOSTS 

Even in the case of too many connections, MySQL should be keeping a connection in reserve so that a super user can connect.

The mysqladmin client generally connects as root anyway and issues the above SQL.

like image 73
barryhunter Avatar answered Sep 19 '22 01:09

barryhunter


Login to any other EC2 instance you have that has access to the RDS instance in question and has mysqladmin installed and run

mysqladmin -h <RDS ENDPOINT URL> -P 3306 -u <USER> -p flush-hosts 

you will be prompted for your password

like image 22
Chris Avatar answered Sep 19 '22 01:09

Chris