Zabbix Documentation 4.0

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:appendix:install:db_scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:appendix:install:db_scripts [2019/02/22 12:15]
martins-v some reordering
manual:appendix:install:db_scripts [2020/02/20 13:53] (current)
martins-v removing duplicated instructions
Line 12: Line 12:
  
 UTF-8 is the only encoding supported by Zabbix. It is known to work without any security flaws. Users should be aware that there are known security issues if using some of the other encodings. UTF-8 is the only encoding supported by Zabbix. It is known to work without any security flaws. Users should be aware that there are known security issues if using some of the other encodings.
 +
 === MySQL === === MySQL ===
  
Line 18: Line 19:
   shell> mysql -uroot -p<​password>​   shell> mysql -uroot -p<​password>​
   mysql> create database zabbix character set utf8 collate utf8_bin;   mysql> create database zabbix character set utf8 collate utf8_bin;
-  mysql> grant all privileges on zabbix.* to [email protected]localhost identified by '<​password>​';+  ​mysql> create user '​zabbix'​@'​localhost'​ identified by '<​password>';​ 
 +  ​mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost';
   mysql> quit;   mysql> quit;
  
-If you use Zabbix packages continue with instructions for [[manual:​installation:​install_from_packages:​debian_ubuntu#​importing_data|Debian/​Ubuntu]] or [[manual:​installation:​install_from_packages:​rhel_centos#​importing_data|RHEL/​CentOS]] to import the data into the database.+<note important>​ Zabbix server prior to 4.4 cannot work correctly with newer MariaDB versions out of the box. See [[:​manual/​installation/​known_issues#​MariaDB_row_size_error|Known issues]] for required database modifications. </​note>​ 
 + 
 +<note warning>If you are installing from Zabbix packages, stop here and continue with instructions for [[manual:​installation:​install_from_packages:​debian_ubuntu#​importing_data|Debian/​Ubuntu]] or [[manual:​installation:​install_from_packages:​rhel_centos#​importing_data|RHEL/​CentOS]] to import the data into the database.</​note>​ 
 + 
 +If you are installing Zabbix from sources, proceed to import the data into the database:
  
   shell> cd database/​mysql   shell> cd database/​mysql
Line 35: Line 41:
   shell> sudo -u postgres createuser --pwprompt zabbix   shell> sudo -u postgres createuser --pwprompt zabbix
  
-Now we will set up the database ''​zabbix''​ (last parameter) with the previously created user as the owner (''​-O zabbix''​) ​and import initial schema and data (assuming you are in the root directory of Zabbix sources):+Now we will set up the database ''​zabbix''​ (last parameter) with the previously created user as the owner (''​-O zabbix''​).
  
   shell> sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix   shell> sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix
  
-If you use Zabbix packages continue with instructions for [[manual:​installation:​install_from_packages:​debian_ubuntu#​importing_data|Debian/​Ubuntu]] or [[manual:​installation:​install_from_packages:​rhel_centos#​importing_data|RHEL/​CentOS]] to import the data into the database.+<note warning>If you are installing from Zabbix packages, stop here and continue with instructions for [[manual:​installation:​install_from_packages:​debian_ubuntu#​importing_data|Debian/​Ubuntu]] or [[manual:​installation:​install_from_packages:​rhel_centos#​importing_data|RHEL/​CentOS]] to import the initial schema and data into the database.</​note>​ 
 + 
 +If you are installing Zabbix from sources, proceed to import the initial schema and data (assuming you are in the root directory of Zabbix sources):
  
   shell> cd database/​postgresql   shell> cd database/​postgresql