[Snort-users] Mysql table creation

Chris Owen cowen at ...2258...
Wed Jun 13 14:22:44 EDT 2001


I'm using;

mysql-3.23.38-pc-linux-gnu-i686.tar.gz
snort-1.7.tar.gz
acid-0.9.6b9.tar.gz
gd-1.8.4.tar.gz
php-4.0.5.tar.gz
adodb112.tgz
phplot-4.4.6.tar.gz

I used the create_mysql script from ./contrib/create_mysql in
snort-1.7.tar.gz.

in create_mysql lines 121-127 are...

# encoding is a lookup table for storing encoding types
CREATE TABLE encoding(encoding_type TINYINT UNSIGNED NOT NULL,
                      encoding_text TEXT NOT NULL,
                      PRIMARY KEY (encoding_type));
INSERT INTO encoding (encoding_type, encoding_text) VALUES (0, 'hex');
INSERT INTO encoding (encoding_type, encoding_text) VALUES (1, 'base64');
INSERT INTO encoding (encoding_type, encoding_text) VALUES (2, 'ascii');

Output of echo 'show tables;' | mysql -u root -p;

mysql> connect snort
mysql> show tables;
+-----------------+
| Tables_in_snort |
+-----------------+
| acid_ag         |
| acid_ag_alert   |
| data            |
| encoding        |
| event           |
| icmphdr         |
| iphdr           |
| opt             |
| sensor          |
| tcphdr          |
| udphdr          |
+-----------------+
11 rows in set (0.00 sec)

PS... I'm still able to log to this database and report from it.  I was just
curious what the error meant.

 Chris.

-----Original Message-----
From: roman at ...438... [mailto:roman at ...438...]
Sent: Wednesday, June 13, 2001 7:06 AM
To: Chris Owen
Cc: snort-users at lists.sourceforge.net
Subject: Re: [Snort-users] Mysql table creation


Chris,

What version of script are you running (what version of Snort
did you get it with?)? Version of Mysql?

What are the results of 

mysql> show tables

(I'm trying to determine which INSERT statement caused the
error)

Roman


On Wed, 13 Jun 2001, Chris Owen wrote:

> When running 'mysql -u snort -D snort < ./create_mysql' I received the
> error:
>
> ERROR 1062 at line 125: Duplicate entry '0' for key 1
>
> Just previous to this I created the database 'snort' and gave the user
> 'snort' all privileges (to be trimmed shortly.)
>
> Is there something that I've done incorrectly?
>
>  Chris.




More information about the Snort-users mailing list