1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to MySQL ERROR: (1064) ?

Discussion in 'MySQL' started by titoni, Jan 5, 2007.

  1. #1
    When installed a script, I had a mysql problem,below is error message

    Database setup
    Trying to connect to database... Success
    Detecting MySQL version... 
    
    Executing SQL... MySQL ERROR: (1064) You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 1 
    QUERY: 
    
    CREATE TABLE `wl_admin` (`id` int(6) unsigned NOT NULL auto_increment,`username` varchar(50) NOT NULL default '',`passwd` varchar(32) NOT NULL default '',PRIMARY KEY  (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1
    ERROR: You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 1
    Code (markup):
    How to fixed it?
    Thanks in advance
     
    titoni, Jan 5, 2007 IP
  2. EvilivE

    EvilivE Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Two possible solutions:

    1. I don't see a semicolon terminating your create statement
    2. Not absolutely sure but I believe you need to use "ENGINE = MYISAM CHARACTER SET latin1 COLLATE latin1_bin;"
     
    EvilivE, Jan 6, 2007 IP
  3. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This annoyance occurs since about one year ago with the latest phpMyAdmin versions.

    Since I rarely need MySQL, the way I tackled the problem was installing an old phpMyadmin version to avoid error messages.

    Not sure if that might work in your case though.
     
    Pat Gael, Jan 6, 2007 IP
  4. titoni

    titoni Active Member

    Messages:
    965
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Solved, mysql version problem
    Thanks
     
    titoni, Jan 7, 2007 IP
  5. leet

    leet Notable Member

    Messages:
    3,423
    Likes Received:
    369
    Best Answers:
    0
    Trophy Points:
    250
    #5
    I see you fixed your problem, but still for others who have/will have this problem later, this way also works;

    Change this line: ENGINE=MyISAM DEFAULT CHARSET=latin1
    With this line: ENGINE=MyISAM CHARSET=latin1
     
    leet, Jan 7, 2007 IP