Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

SQL Error on MySQL query

Hi All
I am importing the Mysql schema for SNORT but the following query is causing errors

CREATE TABLE schema ( vseq        INT      UNSIGNED NOT NULL,
                      ctime       DATETIME NOT NULL,
                      PRIMARY KEY (vseq));


ERROR 1064 (42000) at line 23: 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 'schema ( vseq        INT      UNSIGNED NOT NULL,
                      ctime    ' at line 1
0
http:// thevpn.guru
Asked:
http:// thevpn.guru
1 Solution
 
BioICommented:
you should change the table-name.
Schema is a "protected" word in mysql
change schema in test, and that should work...
0
 
Aleksandar BradarićSoftware DeveloperCommented:
Or enclose the table name in backticks, like:
---
CREATE TABLE `schema` ...
---
0
 
http:// thevpn.guruAuthor Commented:
Thx for both of you..I will accept leannonn's answer mainly because I can not rename the database name because SNORT needs it as is. Thx
0

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as the high-speed power of the cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now