Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 04:48:22 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: ***SOLVED*** SQL syntax error - DEFAULT charset latin1  (Read 1315 times)
Chaploo
Guest
« on: February 11, 2008, 10:03:46 PM »

Hi everybody,

I have a problem trying to move a wb installation from one server to another: When I try to import the mysql dump from the old server (mysql 4.1.9) into the new one (mysql 4.0.26) the error message says:

#1064 - 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' at line 13

The line in the sql file is:

Code:
CREATE TABLE `addons` (
  `addon_id` int(11) NOT NULL auto_increment,
  `type` varchar(255) NOT NULL default '',
  `directory` varchar(255) NOT NULL default '',
  `name` varchar(255) NOT NULL default '',
  `description` text NOT NULL,
  `function` varchar(255) NOT NULL default '',
  `version` varchar(255) NOT NULL default '',
  `platform` varchar(255) NOT NULL default '',
  `author` varchar(255) NOT NULL default '',
  `license` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`addon_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

I think I have already seen this message before, after I updated the guestbook from 1.9 to the current 2.2 version, but I can't remember, where the message could have been displayed. (And everything works fine with the whole site and the guestbook on the old server.)

Please, can anybody help me?

Regards
Jochen

***UPDATE***

I could solve the problem this way:

In a support forum by domainfactory.de I read about replacing the lines
Code:
ENGINE=MyISAM DEFAULT CHARSET=latin1;
in the sql file with
Code:
TYPE=MyISAM;

And it works!

If anybody knows, if this replacement could have any other negative effects, please tell me!

Regards
Jochen
« Last Edit: February 11, 2008, 10:24:36 PM by Chaploo » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: February 12, 2008, 06:52:52 AM »

Hello,

if you wanna export a database from 4.1 to a 4.0 you simply can choose in phpmyadmin the compatibility for Mysql4 when generating the dump file. This should give you a file wich you could import in lower mysql versions without any problems.

you are shure that the charset is the problem? Wasn't it the kollation? Cause the kollation field was as far as i know introduced with MySQL 4.1.

Matthias
Logged
Chaploo
Guest
« Reply #2 on: February 12, 2008, 11:26:45 AM »

Hi,

yes, I read about the collation thing and tried an export of the database with compatibility form MySQL 4, but unfortunately the problem was still the same.

I think I remeber, when I saw the error message the first time: I had realized, that in this wb installation I had forgotten to change the charset in Admin from utf to iso-8859-1. So i changed it now and had to replace some ü, ä, ö in the database. And when I clicked "Save", the error message appeared, but it wasn't really a problem, the site was working well - until I tried to move to the other server.

Regards
Jochen
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!