标签:using warning lepus ble div can truncate sch unknown
https://www.cnblogs.com/ivictor/p/5311607.html
该阻止会一直生效,直到采取以下操作:
1. mysql> flush hosts;
2. # mysqladmin flush-hosts
3. truncate table performance_schema.host_cache;
4. 或者等待该记录从host cache中被挤掉。
如果要禁止DNS解析,可设置skip_name_resolve参数,这样,mysql.user表中基于主机名的授权将无法使用,且错误日志中会提示:
[Warning] ‘user‘ entry ‘root@mysql-slave1‘ ignored in --skip-name-resolve mode.
这里,通过mysql-slave1访问,将会拒绝访问
[root@mysql-slave1 ~]# mysql -h192.168.244.145 -uroot -p123 Warning: Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user ‘root‘@‘192.168.244.144‘ (using password: YES)
host cache是默认开启的,如果要禁掉,可将host_cache_size设置为0,该参数是个动态参数,可在线修改。
规避方法:
不使用IP. 而是使用主机
mysql -ulepus_user -plepus -hsdb1-P 3306
####
转发 可设置skip_name_resolve参数 会出现 ERROR 2005 (HY000): Unknown MySQL server host _mysql ...
标签:using warning lepus ble div can truncate sch unknown
原文地址:https://www.cnblogs.com/feiyun8616/p/12243510.html