SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql error #1064

    I purchased a site from someone else, and I am trying to get it installed on my server. I keep getting an error when trying to get the database set up:
    CREATE TABLE `ibf_admin_logs` (
    `id` bigint(20) NOT NULL auto_increment,
    `act` varchar(255) default NULL,
    `code` varchar(255) default NULL,
    `member_id` int(10) default NULL,
    `ctime` int(10) default NULL,
    `note` text,
    `ip_address` varchar(255) default NULL,
    PRIMARY KEY (`id`)
    ) TYPE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=68 ;

    The error:

    ERROR 1064 at line 19: 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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=68' at line 10
    I have downloaded the old database every which way, and I get the same error. My server has is running apache 5.0.4, and mysql version 4.0.25.

    I have a different download the leaves that last line out, as well as another that has ENGINE instead of TYPE. I have tried all the fixes that I could find here, and had no luck at all.

    Thanks for your help.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    Syntax error

    The MySQL docs http://dev.mysql.com/doc/mysql/en/create-table.html show the syntax as CHARACTER SET not CHARSET (without an equal sign?)

  3. #3
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what happens when you leave out the charset and engine parts, but leave in the auto_increment?

  4. #4
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    what happens when you leave out the charset and engine parts, but leave in the auto_increment?
    Hmm, I have tried it leaving the entire line out, but not as you mentioned. Let me try that and see what happens.

  5. #5
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    make sure to post teh exact error when you try that.

  6. #6
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    make sure to post teh exact error when you try that.
    No error, worked like magic. Thanks for your help, I was totally stumped.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •