SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,355
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Mysql Error #1064

    I created a little database site in php 5 and mysql and uploaded it. I exported my database to a text format and ran it on my remote host and it gave me this error

    Code:
      CREATE TABLE `blg_article_art` (
        `id_art` int(11) NOT NULL auto_increment,
        `idtop_art` int(11) NOT NULL default '0',
        `title_art` varchar(100) NOT NULL default '',
        `description_art` longtext NOT NULL,
        `text_art` longtext NOT NULL,
        `date_art` datetime default NULL,
        PRIMARY KEY  (`id_art`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
      
      MySQL said: 
       #1064 - You have an error in your SQL syntax near 'ENGINE =  MYISAM DEFAULT CHARSET  = latin1 AUTO_INCREMENT   
    Me not being a coder, have no clue what the problem is or how to fix it. Can someone look at that?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,
    how about using "DEFAULT CHARACTER SET latin1 " instead of "DEFAULT CHARSET=latin1 " ?

    Chagh

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    instead of ENGINE=MyISAM, try TYPE=MyISAM

    Quote Originally Posted by the fine manual
    The ENGINE and TYPE options specify the storage engine for the table. ENGINE was added in MySQL 4.0.18 (for 4.0) and 4.1.2 (for 4.1). It is the preferred option name as of those versions, and TYPE has become deprecated. TYPE is supported throughout the 4.x series, but likely will be removed in MySQL 5.1.
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,355
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Thanks a million guys! It worked with just the ISAM thing! You don't know how glad i am to get that fixed!

  5. #5
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, I have been having this same problem. I have been moving an invision board over to my server. I have the sql file up on the new site, and when I try to get the new database set up, I get the same error as above. My file is very similar to the one above, not much differnce. I have changed the ENGINE to TYPE, but I get the exact same error.

    Any other suggestions? I have downloaded the file several times/several ways. Every time, the file is exactly the same. Doesn't matter what I do, I get the same error.

    Thanks for your help.

  6. #6
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As an update. It seems as though this exact error comes from moving from PHP 4.1+ servers to a 4.0 server. I am currently running 5.0.4. Should I downgrade?

  7. #7
    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)
    sounds like you are running mysql 3 on your web server. check the minimum system requirements to make sure innovision supports mysql 3.

  8. #8
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using mysql 4.0.25. Any other ideas? Thanks for the suggestion.

  9. #9
    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)
    are you sure? according to the mysql manual, support for engine was added in 4.0.18. maybe you're running 4.0.25 on your test box?

    do a select version() on your remote hose and see what you get.

  10. #10
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really, I am positive. Thanks for your help, I appreciate it.
    Attached Images Attached Images

  11. #11
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any other suggestions? I am still getting the same error, and I really need to get this site up and running. Thanks!

  12. #12
    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)
    you hijacked a year-old thread, and i thought you were the original poster. that's no good because i'm scouring his code for your problem. i'll never find the solution in someone else's code!

    go start your own thread. post an original description of the problem, and include the code that's not working for you and the error.

  13. #13
    SitePoint Member cashable's Avatar
    Join Date
    Mar 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    you hijacked a year-old thread, and i thought you were the original poster. that's no good because i'm scouring his code for your problem. i'll never find the solution in someone else's code!

    go start your own thread. post an original description of the problem, and include the code that's not working for you and the error.
    OK, will do. My code is identical as is the error. Oh, and the thread is all of 7 days old now, though I guess it doesn't make much difference.


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
  •