Hello i have encountered a problem which i seem unable to solve in any safe way.
The problem i have is that i cannot add any new hosts, items or any other sorts of new things to zabbix via the web gui without getting this error.
My first thought is that the DB host configuration was wrong but the username, database name, password all match and are correct in both the zabbix_server.conf and the web´s zabbix.conf.php files. My frontend, server and database is all installed on the same machine, so i use localhost which is also specified in both conf files, as is the use of port 3306.
My second thought was that the zabbix user, was not granted admin rights to add new hosts/items into the zabbix's database, but it does have these privileges as can be seen in the screenshot below. I also tried to login to my database directly with my zabbix DB user, and attempted to see if i could create a table or a host manually which i could, so im 99% sure i ruled out that this problem could be caused by the zabbix user not having enough rights.
I also tried to change the zabbix user i made for the DB, over to be the root user, to see if that would solve anything but it didnt.
I have also tried to set the log_bin_trust_function_creators to both be on and off during testing, because it seemed to fix similar problems to this one for other people but it didnt work in this case.
What does make me able to input items and hosts from the web gui is if i enable --skip-grant-tables. But due to obvious safety concerns i would like another solution, but this has shown me that this is highly likely some privilege issue that is at hand here but for the life of me i cant figure out why.
Also just to mention, i use the zabbix version 6.2.5. My database is mysql v 8.0.31 and all of it runs on a linux machine running ubuntu 20.04.2.
Please i would like some guidance on this if at all possible
The problem i have is that i cannot add any new hosts, items or any other sorts of new things to zabbix via the web gui without getting this error.
- Error in query [INSERT INTO hosts (hostid,status,proxy_hostid,tls_connect,tls_accept ,host,description,ipmi_authtype,ipmi_privilege,ipm i_username,ipmi_password,name) VALUES ('10740','0',NULL,'1','1','TEST01 ','','-1','2','','','TEST01')] [The user specified as a definer ('skip-grants user'@'skip-grants host') does not exist] [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostCreate->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->create() → DB::insert() → DB::insertBatch() → DBexecute() → trigger_error() in include/db.inc.php:367]
- SQL statement execution has failed "INSERT INTO hosts (hostid,status,proxy_hostid,tls_connect,tls_accept ,host,description,ipmi_authtype,ipmi_privilege,ipm i_username,ipmi_password,name) VALUES ('10740','0',NULL,'1','1','TEST01 ','','-1','2','','','TEST01')".
My first thought is that the DB host configuration was wrong but the username, database name, password all match and are correct in both the zabbix_server.conf and the web´s zabbix.conf.php files. My frontend, server and database is all installed on the same machine, so i use localhost which is also specified in both conf files, as is the use of port 3306.
My second thought was that the zabbix user, was not granted admin rights to add new hosts/items into the zabbix's database, but it does have these privileges as can be seen in the screenshot below. I also tried to login to my database directly with my zabbix DB user, and attempted to see if i could create a table or a host manually which i could, so im 99% sure i ruled out that this problem could be caused by the zabbix user not having enough rights.
I also tried to change the zabbix user i made for the DB, over to be the root user, to see if that would solve anything but it didnt.
I have also tried to set the log_bin_trust_function_creators to both be on and off during testing, because it seemed to fix similar problems to this one for other people but it didnt work in this case.
What does make me able to input items and hosts from the web gui is if i enable --skip-grant-tables. But due to obvious safety concerns i would like another solution, but this has shown me that this is highly likely some privilege issue that is at hand here but for the life of me i cant figure out why.
Also just to mention, i use the zabbix version 6.2.5. My database is mysql v 8.0.31 and all of it runs on a linux machine running ubuntu 20.04.2.
Please i would like some guidance on this if at all possible
Comment