I am trying to build Zabbix Server 3.0, but i encountered this issue: So i need to create a zabbix database with this guide:
shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
shell> cd database/mysql
shell> mysql -uzabbix -p<password> zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -p<password> zabbix < images.sql
shell> mysql -uzabbix -p<password> zabbix < data.sql
but when i get to cd database/mysql
i don't really know where i should go, I tried /var/lib/mysql
but then when i get to this step mysql -uzabbix -p<password> zabbix < schema.sql
there is no schema.sql
and i can't find it anywhere. So how can i find/create it or is it with a new name.
If you installed from source, you should do that from the source directory.
If you installed from package repositories, it depends on the distribution and repository.
For example, if you installed from the Zabbix repository on a RedHat system, the SQL might be located in /usr/share/doc/zabbix-server-mysql-3.0.0/create
.
Some packages might combine those three SQL files in one, so you will only have create.sql.gz
. You can import it directly as "zcat create.sql.gz | mysql zabbix". If you want to see the SQL file, you can extract it with 'tar -xvf create.sql.gz' in a single step.