Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th August 2009, 18:16
markerman markerman is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default create.sql error - The Perfect SpamSnake - Ubuntu Jaunty Jackalope - Page 4

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?
Reply With Quote
Sponsored Links
  #2  
Old 8th August 2009, 13:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Can you post the first ten lines of create.sql?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 8th August 2009, 17:44
markerman markerman is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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;
Reply With Quote
  #4  
Old 9th August 2009, 11:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 10th August 2009, 15:05
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

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

Thanks,
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 12th August 2009, 03:54
markerman markerman is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
  #7  
Old 6th September 2009, 02:23
ScarEye ScarEye is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 2 Times in 1 Post
Default

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.

Thanks,
ScarEye
Reply With Quote
  #8  
Old 6th September 2009, 05:57
ScarEye ScarEye is offline
Junior Member
 
Join Date: Sep 2009
Posts: 4
Thanks: 0
Thanked 2 Times in 1 Post
 
Default

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.

Thanks,
ScarEye

Last edited by ScarEye; 6th September 2009 at 06:18.
Reply With Quote
The Following 2 Users Say Thank You to ScarEye For This Useful Post:
falko (6th September 2009), Rocky (8th September 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect SpamSnake - Ubuntu Jaunty Jackalope markerman HOWTO-Related Questions 3 6th August 2009 17:38
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 13:49
The Perfect SpamSnake - Ubuntu 8.04 LTS - Page 02 - Installing Perl Modules denbert HOWTO-Related Questions 12 26th December 2008 13:17
Howtoforge the perfect Server(links) rini90 Installation/Configuration 0 14th December 2008 10:58
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 14:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.