【環境介紹】
系統環境:Red Hat Enterprise Linux 7 + 5.7.25-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)mysql
【狀況描述】linux
在安裝完數據庫以後,查看日誌出現多個Warning信息:sql
2019-04-26T17:28:33.605994+08:00 0 [Note] Server socket created on IP: '::'.
2019-04-26T17:28:33.652894+08:00 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.653069+08:00 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.653099+08:00 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.653630+08:00 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.653648+08:00 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.654222+08:00 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.707215+08:00 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2019-04-26T17:28:33.707301+08:00 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.數據庫
【狀況分析】服務器
skip_name_resolve參數說明:session
此變量是根據--skip-name-resolve選項的值設置的。 若是是OFF,mysqld檢查客戶端鏈接時解析主機名。 若是它是ON,mysqld只使用IP號碼;
在這種狀況下,受權表中的全部主機列值必須是IP地址或localhost。數據庫驗證主機來源,服務器要執行DNS的正向和反向查找,若是DNS出問題,會堆積起來,最終致使鏈接超時,建議設置該參數。socket
查看--skip-name-resolve參數信息:函數
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| skip_name_resolve | ON |
+-------------------+-------+
1 row in set (0.01 sec)
skip_name_resolve = on
root@(none) 08:45:50>
查看用戶信息:spa
+---------------+-----------+
| User | Host |
+---------------+-----------+
| tuan | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
4 rows in set (0.12 sec)
該數據庫是新搭建的,沒有其餘操縱,且初始化時並無報錯,在MOS上面查詢,查看跟類似BUG 23329861 - WARNING ABOUT LOCALHOST WHEN USING SKIP-NAME-RESOLVE日誌
查看該BUG信息,該BUG將在5.7.26進行修復:
描述信息跟BUG一致:
查看官方5.7.26文檔對此BUG的描述:
【對數據庫進行升級修復】
升級過程忽略,查看錯誤日誌信息,已經修復waring:
[Warning] Plugin audit_log reported: 'Audit Log plugin supports a filtering, which has not been installed yet. Audit Log plugin will run in the legacy mode, which will be disabled in the next release.'
爲相應的表及函數沒有建立:
- Linux and Unix: share/audit_log_filter_linux_install.sql
- Windows: share/audit_log_filter_win_install.sql
mysql>SOURCE <path to MySQL base>/share/audit_log_filter_linux_install.sql
mysql> CREATE FUNCTION audit_log_read_bookmark RETURNS STRING SONAME 'audit_log.so';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE FUNCTION audit_log_read RETURNS STRING SONAME 'audit_log.so';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE FUNCTION audit_log_encryption_password_set RETURNS INTEGER SONAME 'audit_log.so';
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE FUNCTION audit_log_encryption_password_get RETURNS STRING SONAME 'audit_log.so';
Query OK, 0 rows affected (0.00 sec)