Zabbix Documentation 4.0

3.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.22.43.23.4

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 [2017/11/28 15:47]
dimir copy from 3.4
manual:appendix:install:db_scripts [2019/02/22 12:15] (current)
martins-v some reordering
Line 11: Line 11:
 <note important>​For a Zabbix proxy database, **only** ''​schema.sql''​ should be imported (no images.sql nor data.sql)</​note>​ <note important>​For a Zabbix proxy database, **only** ''​schema.sql''​ should be imported (no images.sql nor data.sql)</​note>​
  
 +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 ===
 +
 +Character set utf8 and utf8_bin collation is required for Zabbix server to work properly with MySQL database.
  
   shell> mysql -uroot -p<​password>​   shell> mysql -uroot -p<​password>​
Line 34: Line 37:
 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''​) and import initial schema and data (assuming you are in the root directory of Zabbix sources):
  
-  shell> sudo -u postgres createdb -O zabbix 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. 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.
Line 67: Line 70:
   sqlplus> @images.sql   sqlplus> @images.sql
   sqlplus> @data.sql   sqlplus> @data.sql
-  ​ 
-Now the temporary directory can be removed: 
  
-  shellssh [email protected]_host "rm -rf /tmp/​zabbix_images"​+<note tip>Please set the initialization parameter CURSOR_SHARING=FORCE for best performance.<​/note>
  
 +Now the temporary directory can be removed:
  
 +  shell> ssh [email protected]_host "rm -rf /​tmp/​zabbix_images"​
 === IBM DB2 === === IBM DB2 ===