MySQL could not be resolved: Temporary failure in name resolution報錯解決方法
最近幾天研發總是抱怨用Navicat連線MySQL資料庫和開啟資料表很慢,登入資料庫分析,檢視錯誤日誌:
mysql> show variables like 'log_error';
+---------------+--------------------------------+
| Variable_name | Value |
+---------------+--------------------------------+
| log_error | /usr/local/mysql/data/idb3.err |
+---------------+--------------------------------+
1 row in set (0.00 sec)
檢視錯誤日誌:
[root@idb3 data]# cat /usr/local/mysql/data/idb3.err | grep failure |more
2016-05-24 16:06:44 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:06:47 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:00 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:03 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:14 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
..........................................................................................................................
解決方法:
在mysql的配置檔案my.cnf中
[mysqld]
節點新增下面兩行
skip-host-cache
skip-name-resolve
引數解釋如下:
skip-host-cache:禁用主機名快取
skip-name-resolve:禁用主機名解析
然後重啟MySQL資料庫即可解決:
# service mysqld restart
mysql> show variables like 'log_error';
+---------------+--------------------------------+
| Variable_name | Value |
+---------------+--------------------------------+
| log_error | /usr/local/mysql/data/idb3.err |
+---------------+--------------------------------+
1 row in set (0.00 sec)
檢視錯誤日誌:
[root@idb3 data]# cat /usr/local/mysql/data/idb3.err | grep failure |more
2016-05-24 16:06:44 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:06:47 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:00 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:03 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
2016-05-24 16:09:14 11382 [Warning] IP address '172.31.19.113' could not be resolved: Temporary failure in name resolution
..........................................................................................................................
解決方法:
在mysql的配置檔案my.cnf中
[mysqld]
節點新增下面兩行
skip-host-cache
skip-name-resolve
引數解釋如下:
skip-host-cache:禁用主機名快取
skip-name-resolve:禁用主機名解析
然後重啟MySQL資料庫即可解決:
# service mysqld restart
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2138579/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- IP address could not be resolved: Temporary failure in name resolutionAI
- Resolving failed: Temporary failure in name resolution 錯誤解決方法AI
- [virtualbox] temporary failure in name resolutionAI
- name server cannot be used, reason: Temporary failure in name resolutionServerAI
- Temporary failure in name resolution - DNS引發的問題和思考AIDNS
- 關於Chrome報錯 ERR_NAME_NOT_RESOLVED 解決辦法Chrome
- 安裝 dingo/api 報錯:Your requirements could not be resolvedGoAPIUIREM
- Resolving archive.cloudera.com... failed: Temporary failure in nameHiveCloudAI
- POST http://xxx net::ERR_NAME_NOT_RESOLVED 解決HTTP
- mysql 報錯 Communications link failureMySqlAI
- idea執行java專案main方法報build failure錯誤的解決方法IdeaJavaAIUI
- Linux下ODBC連線HGDB報Could not SQLConnect錯解決方法LinuxSQL
- Object Name Resolution (248)Object
- Could not resolve host: 'localhost 報錯解決辦法localhost
- Dynamics CRM 安裝SSRS Extension時報Could not find the name or insufficient right to see name的解決方法
- mysql中出現Unit mysql.service could not be found 的解決方法MySql
- 【MySQL】ERROR 1878 (HY000): Temporary file write failure.MySqlErrorAI
- 解決tensorboard報錯ValueError: Duplicate plugins for name projectorORBErrorPluginProject
- 解決Vagrant報錯Warning: Authentication failure. Retrying問題AI
- PySimpleGUI 引入後VsCode出現問題提示 “could not be resolved” 解決方案GUIVSCode
- Unable to generate a temporary class (result=1)解決方法
- hive使用報錯解決方法Hive
- ORA-25153: Temporary Tablespace is Empty 解決方法
- 寶塔:續簽SSL證書報錯Verification failed, domain name resolution error or verification URL cannot be accessed!AIError
- dbfread報錯ValueError錯誤解決方法Error
- 幾個報錯的解決方法
- Go:錯誤 could not launch process: EOF 解決Go
- mysql匯入報錯怎麼解決?MySql
- mysql MRG_MyISAM 引擎報錯解決MySql
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- Temporary failure resolving ‘archive.ubuntu.com‘AIHiveUbuntu
- mysql登入報錯提示:ERROR 1045 (28000)的解決方法MySqlError
- DBeaver、Navicat、MySQL高頻報錯及解決方法,此文持續更新MySql
- MySQL 5.7 Invalid default value for 'CREATE_TIME'報錯的解決方法MySql
- ceph叢集安裝報錯解決方法
- RAC: SRVCTL and VIPCA 命令報錯解決方法PCA
- MRTG生成首頁報錯解決方法
- DBMS_METADATA報錯解決方法