在centos最小安裝環境下部署zabbix3.2時遇到兩個坑,折騰一下午,折騰的我都開始懷疑人生了,記下了紀念一下。
1.創建zabbix數據庫給zabbix用戶授權後,授權的zabbix用戶無法登陸數據庫,用的是mariadb數據庫。
授權語句:
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by ' <PASSWORD> ';
Query OK, 0 rows affected (0.00 sec)
報錯如下:
[root@zabbix-server mariadb]# mysql -uzabbix -pPASSWORD
ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
折騰了tm好久,授權語句這些都沒報錯,而且是從zabbix官網直接copy下來執行的,怎麼就不能登陸呢????要瘋掉
!!!最後記起好像就是授權語句給密碼這裏有問題。之前也碰到過這個問題,被這個問題困擾了幾次居然還沒長記性,這就是不做筆記,不總結的下場。最後把授權語句改一下居然就可以了:MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'PASSWORD'; 其實是我傻逼了,前面的授權語句沒問題,只是我把密碼設成了<PASSWORD>(含尖括號),而我一直以爲密碼是PASSWORD(不含尖括號)。
2.安裝配置完後,無法啓動zabbix-server
[root@localhost ~]# systemctl start zabbix-server
Job for zabbix-server.service failed. See 'systemctl status zabbix-server.service' and 'journalctl -xn' for details.
最後安裝 yum install trousers gnutls -y 啓動成功。