create.sql error - The Perfect SpamSnake - Ubuntu Jaunty Jackalope - Page 4

Discussion in 'HOWTO-Related Questions' started by markerman, Aug 7, 2009.

  1. markerman

    markerman New Member

    I'm at the point where I run the sql script to create the mailwatch database. But I am getting the following error....

    root@spamsnake:/usr/src/mailwatch# cd mailwatch-1.0.4
    root@spamsnake:/usr/src/mailwatch/mailwatch-1.0.4# mysql -p < create.sql
    Enter password:
    ERROR 1064 (42000) at line 4: 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 DATABASE /*' at line 1
    root@spamsnake:/usr/src/mailwatch/mailwatch-1.0.4# ERROR 1064 (42000) at line 4: 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 '-------------------------------------------------------
    bash: syntax error near unexpected token `('

    Any idea's?
  2. falko

    falko Super Moderator

    Can you post the first ten lines of create.sql?
  3. markerman

    markerman New Member

    1st 10 lines of the create.sql file

    This create.sql file came in the mailwatch-1.0.4.tar.gz package. I made no changes to it. I posted the 1st 24 lines because the 4th line in the error is a comment. So I am assuming it means the 4th line it can processes which would be the "timestamp timestamp(14) NOT NULL," line. It does say "Server Version 3.23.58". If that is the MySQL version this script was written for then that may be the problem. The "The Perfect SpamSnake - Ubuntu Jaunty Jackalope" instructions don't specify a version of MySQL to download but I got "5.0.75-Ubuntu10.2 (Ubuntu)" by following the instructons. Should I remove this version and get the older version or do you know of a newer version of the create.sql file from mailwatch written for the new version of MySQL? I would prefer a new version of the create.sql file written for MySQL version 5.0.75-Ubuntu10.2 (Ubuntu).

    -- MySQL dump 8.23
    -- Host: localhost Database: mailscanner
    -- Server version 3.23.58

    -- Current Database: mailscanner

    CREATE DATABASE /*!32312 IF NOT EXISTS*/ mailscanner;

    USE mailscanner;

    -- Table structure for table `audit_log`

    CREATE TABLE audit_log (
    timestamp timestamp(14) NOT NULL,
    user varchar(20) NOT NULL default '',
    ip_address varchar(15) NOT NULL default '',
    action text NOT NULL
    ) TYPE=MyISAM;
  4. falko

    falko Super Moderator

    Looks ok. Can you try and run each SQL query manually, e.g. on the MYSQL shell or in phpMyAdmin? You'd then know exactly which query is making problems.
  5. Rocky

    Rocky New Member

    That's weird, I didn't run into that issue. Please try what Falko is suggesting and post your results.

  6. markerman

    markerman New Member

    Run SQL commands in the create.sql file manually

    It worked I think. I did not get any errors but a couple warnings per command. The commands completed though. Continued on with the build.

    Thanks Falko.
  7. ScarEye

    ScarEye New Member

    Hello all, i am having the exact same problem, I did a fresh install twice but I am getting the same error. I did mysql -p logged in, and ran few lines of the script went back out an re-ran the script, but still the same error message. Please help.

  8. ScarEye

    ScarEye New Member

    Okay after hours of searching I decided to try something. The fourth line in create.sql looks like this.


    mysql does not like it. So I just brought it down to the normal two -- and BOOM BITCH it worked.....

    Someone should tell the people over at mailwatch to fix that.

    I hope this helps someone save hours worth of aggravation.

    Last edited: Sep 6, 2009

Share This Page