need help with Zabbix server
- 
MariaDB [(none)]> show grants for [email protected];
ERROR 1141 (42000): There is no such grant defined for user 'zabbix' on host 'xx.xx.14.212'
MariaDB [(none)]> show grants for zabbix
-> ;
+-------------------------------------------------------------------------------------------------------+
| Grants for zabbix@% |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO 'zabbix'@'%' IDENTIFIED BY PASSWORD 'F7B59hashhereC9667D7D09DC' |
| GRANT ALL PRIVILEGES ONzabbix. TO 'zabbix'@'%' |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)Do I have too many zabbix users configured? Should I just have the one with the external host IP?
 - 
@Mike-Davis said in need help with Zabbix server:
MariaDB [(none)]> show grants for [email protected];
ERROR 1141 (42000): There is no such grant defined for user 'zabbix' on host 'xx.xx.14.212'
MariaDB [(none)]> show grants for zabbix
-> ;
+-------------------------------------------------------------------------------------------------------+
| Grants for zabbix@% |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO 'zabbix'@'%' IDENTIFIED BY PASSWORD 'F7B59hashhereC9667D7D09DC' |
| GRANT ALL PRIVILEGES ONzabbix. TO 'zabbix'@'%' |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)Do I have too many zabbix users configured? Should I just have the one with the external host IP?
I'm not sure, I don't think so I thought '%' was equivalent to local host.
 - 
@coliver said in need help with Zabbix server:
@Mike-Davis said in need help with Zabbix server:
MariaDB [(none)]> show grants for [email protected];
ERROR 1141 (42000): There is no such grant defined for user 'zabbix' on host 'xx.xx.14.212'
MariaDB [(none)]> show grants for zabbix
-> ;
+-------------------------------------------------------------------------------------------------------+
| Grants for zabbix@% |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO 'zabbix'@'%' IDENTIFIED BY PASSWORD 'F7B59hashhereC9667D7D09DC' |
| GRANT ALL PRIVILEGES ONzabbix. TO 'zabbix'@'%' |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)Do I have too many zabbix users configured? Should I just have the one with the external host IP?
I'm not sure, I don't think so I thought '%' was equivalent to local host.
% is everything, like * would be in other places.
 - 
@coliver I think % is the wildcard from what I read. Not good practice, but I was trying to get it working.
 - 
@Mike-Davis said in need help with Zabbix server:
@coliver I think % is the wildcard from what I read. Not good practice, but I was trying to get it working.
Ah, that makes sense. So that should work.
 - 
You can also attempt to log in from the CLI from the Zabbix server...
mysql -u zabbix -p -h ip.add.14.212And see if it lets you connect.
 - 
sudo mysql -u zabbix -p -h xx.xx.14.212
Enter password:
ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212' (0) - 
@Mike-Davis said in need help with Zabbix server:
sudo mysql -u zabbix -p -h xx.xx.14.212
Enter password:
ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212' (0)Enter in your servers' IP address not the literal "xx.xx.14.212"
 - 
I did enter the real IP address.
 - 
Did you fill in the user password?
 - 
I wonder if Firewalld is blocking this. Zabbix should really be using 'zabbix'@'localhost' instead of the IP address.
 - 
@Mike-Davis said in need help with Zabbix server:
sudo mysql -u zabbix -p -h xx.xx.14.212
Enter password:
ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212' (0)I'm assuming that this mysql server is not on the same server as Zabbix?
So check your firewall, and check /etc/mysql/my.cnf and make sure that it's set to listen on the IP address and not 127.0.0.1.
 - 
I just tested this on my zabbix system and got

He received 2005
 - 
it is on the same server.
I just edited:
sudo vi /etc/zabbix/zabbix_server.conf
and set :
DBhost=localhost - 
@Mike-Davis said in need help with Zabbix server:
it is on the same server.
I just edited:
sudo vi /etc/zabbix/zabbix_server.conf
and set :
DBhost=localhostThen go back and run the Grant commands again, adjusting the IP accordingly.
 - 
It looks like this was a housekeeper / permissions issue.
It was resolved several years ago, so I'm guessing permissions.
 - 
sudo mysql -u zabbix -p -h localhost
Enter password:
ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES) - 
@Mike-Davis said in need help with Zabbix server:
I did enter the real IP address.
Should be 127.0.0.1
 - 
@Mike-Davis said in need help with Zabbix server:
sudo mysql -u zabbix -p -h localhost
Enter password:
ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)Need to grant permissions to the correct user. You have two overlapping users created in that database. Remove them both and start over ONLY with the localhost one.
 - 
Can you confirm the running services against what I have here.
