打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
MySQL [Warning] IP address could not be resolved

IMHO This sounds like you need mysqld to stop using DNS.

Please do the following: Add this to /etc/my.cnf

[mysqld]skip-host-cacheskip-name-resolve

Them restart mysql. From then on, mysql will no longer resolve addresses via DNS.

Give it a Try !!!

CAVEAT

Please read these options in the MySQL Documentation:

Also, there is one restriction to using this: You cannot use DNS names in the host column of any of the grant tables.

UPDATE 2012-12-17 08:37 EDT

I was recently asked if skip-host-cache and skip-name-resolve could be set without a mysql restart. Let's find out:

mysql> show variables like '%host%';+---------------+--------------+| Variable_name | Value        |+---------------+--------------+| hostname      | ************ || report_host   |              |+---------------+--------------+2 rows in set (0.00 sec)mysql> show variables like 'skip_%';+-----------------------+-------+| Variable_name         | Value |+-----------------------+-------+| skip_external_locking | ON    || skip_name_resolve     | OFF   || skip_networking       | OFF   || skip_show_database    | OFF   |+-----------------------+-------+4 rows in set (0.00 sec)mysql> set global skip_name_resolve = 1;ERROR 1238 (HY000): Variable 'skip_name_resolve' is a read only variablemysql>

As shown, skip-host-cache is not visible in the list of global variables. As for skip_name_resolve, it was visible. However, it cannot changed dynamically because it is a read-only variable.

Therefore, skip-host-cache and skip-name-resolve can only be changed via a mysql restart.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
今天发个自己整理的几个Mysql默认参数,默认的让人很蛋疼。持久更新……
MySQL在远程访问时非常慢的解决skip
远程连接mysql速度慢的解决方法:skip
ERROR 1042 (00000): Can't get hostname for your address解决方案
Centos7使用docker部署最新6.2版Zabbix Server端
无密码访问mysql
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服