標籤:discuz http os io ar 檔案 資料 2014 art
部署了discuz ,但是頁面響應太慢。
apache 調成debug 層級看日 (httpd.conf 裡設定)
Apache 沒問題,自己寫的php,html 頁面訪問響應都很快。
看資料庫日誌 是資料存放區目錄下 localhost.localdomain.err
看到 如下 錯誤
2014-08-28 11:00:59 19992 [Warning] IP address ‘192.168.2.241‘ could not be resolved: Temporary failure in name resolution2014-08-28 11:01:00 19992 [Warning] IP address ‘192.168.2.241‘ could not be resolved: Temporary failure in name resolution2014-08-28 11:01:00 19992 [Warning] IP address ‘192.168.2.241‘ could not be resolved: Temporary failure in name resolution2014-08-28 11:01:00 19992 [Warning] IP address ‘192.168.2.241‘ could not be resolved: Temporary failure in name resolution2014-08-28 11:01:00 19992 [Warning] IP address ‘192.168.2.241‘ could not be resolved: Temporary failure in name resolution
網上查了下 ,說是mysql 網域名稱解析的原因引起的
我當時 是在 /etc/hosts
裡添加了當前ip 地址,對應一個網域名稱
192.168.2.241 test_1.smart.com.cn
然後重啟apache 訪問就很快了。
網上說在mysql 設定檔 my.cnf
[mysqld]#stop yu ming jie xi#-skip-host-cacheskip-name-resolve
這樣修改後,以後添加新使用者要注意了。要配置ip 地址,不能使網域名稱,或者授權
mysql> select host,user from mysql.user;+-----------------------+--------+| host | user |+-----------------------+--------+| % | discuz || 127.0.0.1 | root || ::1 | root || localhost | || localhost | root || localhost.localdomain | || localhost.localdomain | root |+-----------------------+--------+
mysql IP address could not be resolved