This is a simple guide to setting up Zabbix 6.4 on Ubuntu 20.04 LTS server. I've added these steps here to make the process easier. If you encounter any problems, please see below for some trouble shooting notes.

Software Versions


  1. Copy the script below into a file
  2. Change the script to execution: chmod +x
  3. Execute the script: sudo ./
#Update and install mysql
sudo apt update && sudo apt upgrade -y && sudo apt -y install mysql-server && sudo systemctl start mysql.service
#Download zabbix
#Install zabbix
dpkg -i zabbix-release\_6.4-1+ubuntu20.04\_all.deb
apt update
#Install zabbix components
apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

Once Zabbix has been installed the database needs to be configured. Logging into mysql may require sudo privilege to login. Once in mysql, the db will need to be created, zabbix user created, zabbix user permission granted, and set the log_bin_trust_function_creators. This is condensed into one SQL line below. It can be read in full on the Zabbix page from the link above. Please change zabbixPassword to a secure password:

sudo mysql

create database zabbix character set utf8mb4 collate utf8mb4_bin; create user zabbix@localhost identified by 'zabbixPassword'; grant all privileges on zabbix.* to zabbix@localhost; set global log_bin_trust_function_creators = 1; quit;

Next you will need to configure the Zabbix user database password. Set the parameter in the following file to your Zabbix users password created in the sql statement above:

sudo nano /etc/zabbix/zabbix_server.conf


The next step is to merge the Zabbix SQL into the database for the configuration.

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -D zabbix -uzabbix -pzabbixUbu

Finally, remove super privivilege and log_bin_trust_function

sudo mysql;
update mysql.user SET Super_Priv='N' where user='zabbix' AND host='localhost';set global log_bin_trust_function_creators = 0; quit;

Once the merge is complete, restart and enable zabbix. After the restart, you should now be able to view Zabbix in the browser:

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

Local Zabbix

Here are some parameters to set help with the Zabbix Web Configuration:

Default login:Admin
Default password:zabbix
MYSQL port:3306


ERROR 1046 (3D000) at line 1: No database selected

Add the -D databasename

mysql -D zabbix -p < images_mysql.sql