Skip to content

FAQ

1. Host '192.168.0.5' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

已经超过主机允许连接错误的次数

bash
# 传统方式
flush hosts;
# 最新方式
truncate table performance_schema.host_cache;
show variables like '%max_connect_errors%';
set global max_connect_errors = 500;
flush privileges;
service mysql restart

2. Public Key Retrieval is not allowed

只存在于MySQL8当用户使用sha256_password加密的时候,使用mysql_native_password的时候不存在这个问题。 可以在连接显式指定下面参数来解决,但是这个可能存在不安全的风险因素。

bash
allowPublicKeyRetrieval=true&useSSL=false