Quantcast
Channel: MySQL Forums - Install & Repo
Viewing all articles
Browse latest Browse all 7239

DATETIME Issue (no replies)

$
0
0
I'm using Snort to capture network traffic which is being stored in a MySQL database using the create_mysql schema.

The default schema uses TIMESTAMP to record the data instances, however I wish to use DATETIME. I adjusted the schema to insert this:

CREATE TABLE event ( sid INT UNSIGNED NOT NULL,
cid INT UNSIGNED NOT NULL,
signature INT UNSIGNED NOT NULL,
datetime DATETIME NOT NULL,
date DATE NOT NULL,
timestamp TIMESTAMP NOT NULL,
PRIMARY KEY (sid,cid),
INDEX sig (signature),
INDEX time (timestamp));

but find that when looking in the database I get no records captured for DATETIME or DATE yet TIMESTAMP still appeasr to work as before:

sid cid signature datetime date timestamp
2 45 1 0000-00-00 00:00:00 0000-00-00 2010-08-18 20:21:58

Could anybody tell me what I'm doing wrong and how I can get the datetime to record the relevant data as I cannot use TIMESTAMP given the way this records data.

thanks

Doug
IMSS
University of Reading

Viewing all articles
Browse latest Browse all 7239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>