PDA

View Full Version : Difficulty importing to mysql database


Ecillipilla
09-29-2008, 11:33 PM
Can someone please tell me why this query returns error #1064.
I'm running it through phpmyadmin installed on a FQ server.
The goal is to import a .sql file, I can import the file on various free mysql providers but I can't understand why it won't work on FQ. :umm:

CREATE TABLE `bescherming` (
`id` int(1) NOT NULL auto_increment,
`type` int(1) NOT NULL default '0',
`minuten` int(255) NOT NULL default '0',
`prijs` int(255) NOT NULL default '0',
`naam` varchar(255) NOT NULL default '',
`time` int(255) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

This is the very start of the .sql file ^^

Kevin
09-29-2008, 11:36 PM
The problem is probably the CHARSET=latin1 part. If you need control over the character set then you probably need to request that your account be migrated to MySQL version 5. You can request that at the service desk.

Ecillipilla
09-29-2008, 11:46 PM
I deleted that part and tried the query again, same error
CREATE TABLE `bescherming` (
`id` int(1) NOT NULL auto_increment,
`type` int(1) NOT NULL default '0',
`minuten` int(255) NOT NULL default '0',
`prijs` int(255) NOT NULL default '0',
`naam` varchar(255) NOT NULL default '',
`time` int(255) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT AUTO_INCREMENT=4 ;

I have some other things using mysql on my account, I don't want to mess with upgrading unless it is absolutely needed.
#1064 is listed as "ER_PARSE_ERROR". Any more ideas? Sound like a version incompatibility? I didn't write this code, thanks for the quick response.

Kevin
09-29-2008, 11:48 PM
OK, I just checked.
MySQL v4 doesn't like the 'DEFAULT' part in the last line.
MySQL v5 works fine with the original query.

Ecillipilla
09-29-2008, 11:52 PM
DING DING DING
Sir you are correct! Thank you very much!

Kevin
09-29-2008, 11:54 PM
BTW, if you still have access to the system that made the mysqldump file you could always dump it again with the mysql40 compatibility option to make sure there are no other glitches.