SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Running Slack64-current (plus AlienBob's Plasma 5). On another machine some years ago I had snort set up feeding to barnyard2 and to mysql. Worked fine. On a different machine now I have snort and pulled pork installed and seem to be running fine. I installed barnyard2 and got to the point of setting up the snort database in Mariadb-10.2.9. Running the supplied schema threw some errors so I created the db and populated it with tables manually using phpMyAdmin. It appears that the barnyard schema was written a while back and I got errors trying to create two of the tables (everything else went without a hitch) -
CREATE TABLE reference ( ref_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ref_system_id INT UNSIGNED NOT NULL,
ref_tag TEXT NOT NULL,
PRIMARY KEY (ref_id));
gave error -
Error
SQL query:
CREATE TABLE reference ( ref_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ref_system_id INT UNSIGNED NOT NULL,
ref_tag TEXT NOT NULL,
PRIMARY KEY (ref_id))
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ref_system_id INT UNSIGNED NOT NULL,
ref_tag ' at line 2
and
CREATE TABLE reference_system ( ref_system_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ref_system_name VARCHAR(20),
PRIMARY KEY (ref_system_id));
gave -
Error
SQL query:
CREATE TABLE reference_system ( ref_system_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ref_system_name VARCHAR(20),
PRIMARY KEY (ref_system_id))
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ref_system_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
' at line 1
Can anyone that is familiar with updated versions of MariaDB please have a look and heopfully let me know the proper syntax to create these two tables??? Thanks in advance
Hello, thank you for giving it a try and reporting the results. I gave it a go just now directly in mysql but alas it resulted in the same error.
MariaDB [snort]> CREATE TABLE reference ( ref_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
-> ref_system_id INT UNSIGNED NOT NULL,
-> ref_tag TEXT NOT NULL,
-> PRIMARY KEY (ref_id));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ref_system_id INT UNSIGNED NOT NULL,
ref_tag ' at line 2
MariaDB [snort]>
Git it sorted. I found the same schema at https://github.com/firnsy/barnyard2/...s/create_mysql and even though it looks identical to the one supplied with Barnyard2 the one from github works fine in mysql. Must be some subtle bit that I can't see in the schema supplied with Barnyard2. Anyway, alles paletti.
One very subtle change for the two tables over in the SCHEMA that you linked is that `ref_system_id` is quoted with back-ticks:
Code:
CREATE TABLE reference ( ref_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
`ref_system_id` INT UNSIGNED NOT NULL,
ref_tag TEXT NOT NULL,
PRIMARY KEY (ref_id));
CREATE TABLE reference_system ( `ref_system_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
ref_system_name VARCHAR(20),
PRIMARY KEY (`ref_system_id`));
Odd ... ref_system_id doesn't appear to be a reserved word, but SQL Engines can be mysterious at times
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.