i install by following https://www.zabbix.com/download?zabb...debian&os_vers ion=11_bullseye&db=mysql&ws=apache. Completed every task without any error. In the installing page I get the following error "Error connecting to database." I notice that the database is selected as postgres which I cant change I also tried changing the port number to MySQL 3306 still get the same error. "379632:20220731:014649.082 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)" this is my log output. Running MySQL script once again I get "ERROR 1050 (42S01) at line 1: Table 'role' already exists"
Ad Widget
Collapse
"Error connecting to database." no option for mysql
Collapse
X
-
Tags: None
-
First of all, check which Zabbix version you had installed. For MySQL or PostgreSQL?
Code:apt list --installed | grep zabbix
Can you connect to MySQL using your us and password:
Code:mysql -uzabbix -p zabbix
-
apt list --installed | grep zabbix
OUTPUT:
zabbix-agent/parrot,now 1:5.0.8+dfsg-1 amd64 [installed]
zabbix-apache-conf/unknown,now 1:6.2.1-1+debian11 all [installed]
zabbix-frontend-php/parrot,parrot,now 1:5.0.8+dfsg-1 all [installed]
zabbix-release/unknown,now 1:6.2-1+debian11 all [installed]
zabbix-server-mysql/parrot,now 1:5.0.8+dfsg-1 amd64 [installed]
zabbix-sql-scripts/unknown,now 1:6.2.1-1+debian11 all [installed]
mysql -uzabbix -p zabbix
OUTPUT:
+--------------------+
| Database |
+--------------------+
| information_schema |
| zabbix |
+--------------------+
2 rows in set (0.001 sec)
-
-
Check if the user exists:cannot use database "zabbix": its "users" table is empty
Check privileges granted to a 'zabbix; user account from a localhost:Code:SELECT User, Host FROM mysql.user where user='zabbix';
Code:SHOW GRANTS FOR 'zabbix'@'localhost';
Comment
-
Comment
-
I get this error:
Setting up zabbix-server-pgsql (1:5.0.8+dfsg-1) ...
ucfr: Attempt from package zabbix-server-pgsql to take /etc/zabbix/zabbix_server.conf away from package zabbix-server-mysql
ucfr: Aborting.
dpkg: error processing package zabbix-server-pgsql (--configure):
installed zabbix-server-pgsql package post-installation script subprocess returned error exit status 4
Setting up php-mysql (2:7.4+76) ...
Processing triggers for libapache2-mod-php7.4 (7.4.30-1+deb11u1) ...
Processing triggers for php7.4-cli (7.4.30-1+deb11u1) ...
Errors were encountered while processing:
zabbix-server-pgsql
needrestart is being skipped since dpkg has failed
Scanning application launchers
Removing duplicate launchers or broken launchers
Launchers are updated
E: Sub-process /usr/bin/dpkg returned an error code (1)
But now I see MySQL in the installation page but with an error:
Unable to determine current Zabbix database version: the table "dbversion" was not found.Last edited by prisoner267; 03-08-2022, 20:52.
-
-
Your zabbix-server package is installed from a Parrot repository, not from Zabbix official repository.zabbix-server-mysql/parrot,now 1:5.0.8+dfsg-1 amd64 [installed]
I'd recommend uninstalling all those parrot packages and reinstalling them from the official Zabbix repository. Maybe you installed them before installing zabbix-release package (or running apt update)?
MarkkuComment
-
after apt update:
Hit:6 https://repo.zabbix.com/zabbix-agent2-plugins/1/debian bullseye InRelease
Hit:7 https://repo.zabbix.com/zabbix/6.2/debian bullseye InRelease
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://repo.zabbix.com/zabbix/6.2/debian bullseye InRelease' doesn't support architecture 'i386'
after seeing the hits we can understand that indeed that's the zabbix repo because I install zabbix.deb. But at the last line throughs an error
I tried
sudo dpkg --add-architecture amd64
still getting the same error after I do apt update:
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://repo.zabbix.com/zabbix/6.2/debian bullseye InRelease' doesn't support architecture 'i386'Last edited by prisoner267; 03-08-2022, 20:52.
-
-
--> GRANT ALL PRIVILEGES ON `zabbix`.* TO `zabbix`@`localhost
again I tried
--> ERROR 1142 (42000): SELECT command denied to user 'zabbix'@'localhost' for table 'user'Code:SELECT User, Host FROM mysql.user where user='zabbix';
Comment
Comment