转发 可设置skip_name_resolve参数 会出现 ERROR 2005 (HY000): Unknown MySQL server host _mysql ...

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 ‘[email protected]‘ ignored in --skip-name-resolve mode.

这里,通过mysql-slave1访问,将会拒绝访问

[[email protected] ~]# 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

####

原文地址:https://www.cnblogs.com/feiyun8616/p/12243510.html

时间: 2024-10-12 15:40:23

转发 可设置skip_name_resolve参数 会出现 ERROR 2005 (HY000): Unknown MySQL server host _mysql ...的相关文章

Mysql数据库从本地导出 服务器上导入时报 ERROR 2005 HY000 Unknown MySQL ser

今天在做数据恢复的时候,发现本地通过mysqldump导出的数据,在服务器上通过source导入数据的时候,在导入的一部份数据的时候,就会报这样的错误: ERROR 2005 (HY000): Unknown MySQL server host 'mysql' 然后就退出mysql的登陆. 1.刚开始以为是数据不完整,又双本地导出一份,再重新还是这样的结果: 2.又怀疑是不是两边创建的数据库编码是不是不同,一看都是是UTF8: 3.有人说是不是MYSQL两边的版本不一致,高版本导出的数据,在低版

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen

转自:http://www.cnblogs.com/iosdev/archive/2013/07/15/3190431.html mysql 配置文件目录:/etc/my.cnf root 密码为空的时候配置文件中下面这句: skip-grant-tables GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY '123' WITH GRANT OPTION; 执行这句时候错误: ERROR 1290 (HY000): The MySQL server is

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe

在Mysql集群中创建用户时.出现如下错误! mysql> create user 'testuse'@'localhost' identified by '111111'; ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement 解决办法: 在命令行输入:mysql> flush privileges;

mysql 导出数据到文件数据异常 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 首先输入下面下面命令查看 show global variables like '%secure%'; 查询secure_file_priv 我的当时为null所以要修改: 修改方法:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

今天在学习MySQL时候,想要将文本文件的数据导入到数据库中,却发现一直报错,换了导入文本的路径也还是同样的错误,错误显示ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement. 然后在网上找解决办法,找的方法在Linux 下也不怎么好用,最后找到了解决Linux下MySQL文件导入出错的方法 出错的原因是因为在My

mysql 设置skip_name_resolve参数 日志 [Warning] 'user' entry '[email protected]' ignored in --skip-name-resolve mode

[环境介绍]  系统环境:Red Hat Enterprise Linux 7 + 5.7.25-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) [情况描述] 在安装完数据库之后,查看日志出现多个Warning信息: 2019-04-26T17:28:33.605994+08:00 0 [Note] Server socket created on IP: '::

mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password

[问题] 有时候,只是为了自己测试,不想密码设置得那么复杂,譬如只想设置root的密码为123456. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456'); 但是会报错: mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123');ERROR 1819 (HY000): Your password does not satisfy the current policy re

mysql在导入大数据库的时候,报错ERROR 2006 (HY000): MySQL server has gone away

或者,报错信息: ERROR 2005 (HY000): Unknown MySQL server host '10997107101114' (0)ERROR:Can't connect to the server No connection. Trying to reconnect... ======================= 解决办法: mysql> show global variables like 'max_allowed_packet'; mysql> set globa

mysql ERROR 1290 (HY000):

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe 在Mysql集群中创建用户时.出现如下错误! mysql> create user 'testuse'@'localhost' identified by '111111';ERROR 1290 (HY000): The MySQL server is running with the --ski