转自:http://blog.csdn.net/yiluoak_47/article/details/53381282

参数用途: 
skip-name-resolve #禁止MySQL对外部连接进行DNS解析skip-grant-tables

添加–skip-name-resolve方法:

[Mysqld]
……
skip-name-resolve
……

修改配置文件添加并需要重启。

参数优化: 
skip-name-resolve 参数的目的是不再进行反解析(ip不反解成域名),这样可以加快数据库的反应时间。 
内部有DNS服务器,对各服务器的IP做了反向解析,但未对内网IP做反向解析,所以使用skip-name-resolve以后用内网地址向mysqlslap请求响应快了一半。

添加“–skip-name-resolve mode”参数后发现错误日志有

120203 10:21:06 [Warning] 'user' entry 'root@jimmyli\' ignored in --skip-name-resolve mode.
120203 10:21:06 [Warning] 'user' entry '@jimmyli\' ignored in --skip-name-resolve mode.

只需去服务器里边把用户root@jimmyli和@jimmyli删除即可。

提示Warning信息:

130739 11:12:22 [Warning] 'user' entry 'root@localhost.localdomain\' ignored in --skip-name-resolve mode.
130739 11:12:22 [Warning] 'user' entry '@localhost.localdomain\' ignored in --skip-name-resolve mode.

一般在优化MySQL配置参数时,添加“–skip-name-resolve”,然后在重新启动MYSQL时检查启动日志,发现有警告信息。如上。

原因分析: 
“–skip-name-resolve mode”是禁用dns解析,避免网络DNS解析服务引发访问MYSQL的错误,一般应当启用。 
启用“–skip-name-resolve mode”后,在MySQL的授权表中就不能使用主机名了,只能使用IP ,出现此警告是由于mysql 表中已经存在有 localhost.localdomain 帐号信息。

解决方法: 
把Warning的账号删除就解决了。 
MySQL命令行:

mysql>use mysql;
mysql> delete from user where HOST='localhost.localdomain';
Query OK, 2 rows affected (0.00 sec)

最后,重启MySQL,再看错误信息提示,日志发现警告已经没有啦。该方法是mysql启用skip-name-resolve模式时出现Warning的处理办法。

优化MySQL开启skip-name-resolve参数时显示“ignored in --skip-name-resolve mode.”Warning解决方法的更多相关文章

  1. Mysql数据库,表中有中文时,select出来好多问号(?)的解决方法

    在QQ群里问了一些高手,同时参考了这篇文章:http://huangyunbin.iteye.com/blog/1113983,终于把这个问题搞定了. 首先,我用的是zip包的Mysql,直接解压使用 ...

  2. 使用AFNetworking 2.0 请求数据时出现错误 Request failed: unacceptable content-type: text/html 解决方法

    使用AFNetworking 2.0 请求数据时出现错误 Request failed: unacceptable content-type: text/html 解决方法 添加一行 manager. ...

  3. 使用webstrom开发react-native时react-native代码会出现红色下划线的解决方法

    问题:使用webstrom开发react-native时react-native代码会出现红色下划线的解决方法 解决方法:webstrom ->preferences->Laugrange ...

  4. 在Eclipse中运行Jboss时出现java.lang.OutOfMemoryError:PermGen space及其解决方法

    在Eclipse中运行Jboss时出现java.lang.OutOfMemoryError:PermGen space及其解决方法 在Eclipse中运行Jboss时,时间太长可能有时候会出现java ...

  5. 开发JAVA9以上的项目时,出现ClassNotFoundException: javax.xml.bind.JAXBException的解决方法

    一.问题描述: 开发JAVA9以上的项目时,出现ClassNotFoundException: javax.xml.bind.JAXBException的解决方法 二.问题样例 三.解决方案 打开mv ...

  6. 架设传奇时打开DBC数据库出错或读取DBC失败解决方法

    架设传奇时打开DBC数据库出错或读取DBC失败解决方法 DBC右键-属性-高级-管理员身份运行 即可

  7. Android Studio Eclipse运行时出现 finished with non-zero exit value 2 错误解决方法

    作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985 QQ986945193 微博:http://weibo.com/mcxiaobing Error:Ex ...

  8. MySql连接时出现1251 client does no support authentic错误解决方法

    使用Navicat Premium软件连接时,报错: 解决方法: 修改配置项:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password B ...

  9. MySQL This function has none of DETERMINISTIC, NO SQL...错误1418 的原因分析及解决方法

    MySQL开启bin-log后,调用存储过程或者函数以及触发器时,会出现错误号为1418的错误: ERROR 1418 (HY000): This function has none of DETER ...

随机推荐

  1. the difference between an embOS interrupt and a zero latency interrupt

    the difference between an embOS interrupt and a zero latency interrupt is the interrupt priority lev ...

  2. Revit API注册事件

    start using Autodesk.Revit.DB.Events; //http://revit.haotui.com [Autodesk.Revit.Attributes.Transacti ...

  3. NavigateToPageAction打开新页面

    首先要加上两个命名空间 分别为: xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.In ...

  4. 清除数据库表、外键、存储过程SQL

    1.删除所有外键 )    begin         exec(@c1)        fetchnextfrom c1 into@c1    endclose c1deallocate c1 2. ...

  5. C++类静态数据成员与类静态成员函数

    from:://http://blog.csdn.net/taina2008/article/details/1684834 把类中的函数都定义成静态函数,这样相当于在编译时就分配了空间,这样不需要实 ...

  6. ibatis.net:在VS中支持xml智能提示

    下载ibatis.net,在其解压目录下有几个后缀为“.xsd”的文件,将他们拷贝到如下目录:

  7. 禁止tomcat生成catalina.out、localhost_access_log、host-manager.log、localhost.log、manager.log这些文件

    1.找到tomcat目录conf,logging.properties把这个文件重命名(推荐:也可以根据自己的需要更改里面的配置文件) 其实删掉也可以但是不建义 这样就不会生成host-manager ...

  8. PCM转MP3工具的封装

    PCM转MP3工具的封装 说明 1. 对 PCM 转 MP3 进行了简单的封装. 2. 使用 https://github.com/wuqiong/mp3lame-for-iOS 生成支持64位的 l ...

  9. 迷宫问题的C语言求解

    1 .Preface /** * There have been many data to introduce the algorithm. So I will try to simply expla ...

  10. mongodb centos7上的安装

    1,下载安装包 下载mongoDB的安装文件地址:https://www.mongodb.org/downloads#production 选择Linux 64-bit legacy 版本,下载到目标 ...