# [Zabbix] Zabbix Installation problem (solved)

## mich

Hi,

I'm trying to install zabbix in my gentoo distrib. I follow a guide in this address: http://www.zabbix.com/wiki/doku.php?id=howto:gentoo

When i arrive to the step where i do the following:

mysql> source /usr/share/zabbix/database/create/schema/mysql.sql

i receive the following message:

Failed to open file '/usr/share/zabbix/database/create/schema/mysql.sql', error: 2.

Is like the mysql.sql not exist. I created but the same thing.

Can somebody help me please?

Thanls in advance,

MichelLast edited by mich on Tue Oct 21, 2008 11:50 am; edited 1 time in total

----------

## mich

Now is OK. In fact the command is:

source /usr/share/zabbix/database/create/mysql/schema.sql

Mich

----------

## guid0

seems that the source file is a bit buggy.. I wonder why some of the "--" entries appear to be failing or perhaps 

```
mysql> source /usr/share/zabbix/database/create/mysql/schema.sql

Query OK, 0 rows affected, 1 warning (0.04 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 2 warnings (0.03 sec)

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--delay                      int(4)       D

EFAULT '0' NOT NULL,

  subject               varchar(255)    DEFAULT '' NOT N' at line 4

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--CREATE TABLE stats (

--) type=InnoDB' at line 1

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 2 warnings (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 2 warnings (0.01 sec)

Query OK, 0 rows affected, 2 warnings (0.02 sec)

Query OK, 0 rows affected, 6 warnings (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> 
```

seems like a failure in the file where "--" should be "-- " on a few places.

```
--

-- Table structure for table 'actions'

--

CREATE TABLE actions (

  actionid              int(4)          NOT NULL auto_increment,

  userid                int(4)          DEFAULT '0' NOT NULL,

--delay                 int(4)          DEFAULT '0' NOT NULL,

  subject               varchar(255)    DEFAULT '' NOT NULL,

  message               blob            DEFAULT '' NOT NULL,

--nextcheck             int(4)          DEFAULT '0' NOT NULL,

  recipient             int(1)          DEFAULT '0' NOT NULL,

  maxrepeats            int(4)          DEFAULT '0' NOT NULL,

  repeatdelay           int(4)          DEFAULT '600' NOT NULL,

  source                int(1)          DEFAULT '0' NOT NULL,

  actiontype            int(1)          DEFAULT '0' NOT NULL,

  status                int(1)          DEFAULT '0' NOT NULL,

  scripts               blob            DEFAULT '' NOT NULL,

  PRIMARY KEY (actionid)

) type=InnoDB;

```

----------

## guid0

yep that fixed it for me.

----------

