Page 1 of 1

phpMyAdmin export/import problem

Posted: Tue Dec 14, 2004 3:31 pm
by Steveo31
Hey guys-

I built a site on my home comp, and works 100% on everything. When I tried to export the DB structure to the server, it threw an error. Here's what phpMyAdmin exported:

Code: Select all

CREATE TABLE `comments` (
  `id` int(8) NOT NULL auto_increment,
  `username` varchar(30) NOT NULL default '',
  `re` varchar(50) NOT NULL default '',
  `service` int(8) NOT NULL default '0',
  `quality` int(8) NOT NULL default '0',
  `reliability` int(8) NOT NULL default '0',
  `recommend` int(8) NOT NULL default '0',
  `comment` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`,`re`),
  KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
And the error when I tried it on the server:

Code: Select all

#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 AUTO_INCREMENT=1' at line 12
If I take out the "DEFAULT", it works fine. Buuuut, I kinda need all the info there.... why wont phpMyAdmin take it's own data? I have the same version as my server does.

Posted: Tue Dec 14, 2004 9:49 pm
by lostboy
can't say offhand why its giving you grief but consider creating the table wihtout it and then doing an alter statement to set the NLS specs that you want

Posted: Wed Dec 15, 2004 2:22 am
by Steveo31
Yea that was the best way, but man, what a pain. Wondering if this is some kind of bug or something. Just seems logical that if it creates it, it should also be able to read it. :-/

Posted: Wed Dec 15, 2004 8:26 am
by lostboy
could be a version difference or something unusual about the setup at the remote site

Posted: Fri Dec 17, 2004 1:57 am
by dreamline
I had the same problem and as far as i could tell it was a version prob.. My host was running v3.23 while my system at home is running 4.x...

If you delete ENGINE=MyISAM DEFAULT CHARSET=latin1, it should work.. Worked for me though... :D