我正在使用以下系统:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
$ uname -a
Linux ip-X-X-X-X.ec2.internal 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Aug 25 11:21:22 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -q php
php-5.4.32-1.el7.remi.x86_64
$
并且时不时地,我会收到以下错误:
Warning: mysql_connect(): Host 'ip-X-X-X-X.ec2.internal' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /var/www/html/X/wp-includes/wp-db.php on line 1454
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at ip-X-X-X-X.ec2.internal. This could mean your host's database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
... 运行后mysqladmin flush-hosts
错误消失。
我的问题是:究竟是什么原因造成的?我可以进行哪些调整以防止此错误频繁发生?