Setting Up DB
-
4. Making DB
Again Creating Zabbix MySQL Database.
mysql -uroot -p[root_password]
Login with your [root_password].
Then Make the Database:create database zabbix character set utf8 collate utf8_bin;
And Grant the Privileges to the ‘zabbix’ User:
grant all privileges on zabbix.* to zabbix@localhost identified by '[zabix_password]';
Set a Custom [zabix_password] for the zabbix User.
Finally, to Quit:quit;
Instead, for the PostgreSQL Database follow this other Guide
-
5. Editing Configuration
And also Edit Zabbix Server Configuration File.
sudo nano /etc/zabbix/zabbix_server.conf
Set the password the same one you choose before:
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=[zabix_password]
Simply Set the [zabix_password] in the Above!
Ctrl+x to Save & Exit from nano ;) -
6. Importing Data
Now to Import Zabbix Data into Database
For MySQL do:zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix
When instead on PostgreSQL use:
zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | sudo -u zabbix psql zabbix
Contents