Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on Importing a Database from a different host

Status
Not open for further replies.

survivorjoe

Technical User
Dec 6, 2000
26
0
0
US
I am trying to import a database from one web host to a different one (1and1.com). Here is what happens when I try to process the file:

-- phpMyAdmin SQL Dump
-- version 2.6.1
-- --
-- Host: localhost
-- Generation Time: Mar 21, 2007 at 06:14 PM
-- Server version: 4.1.14
-- PHP Version: 4.4.4
--
-- Database: `db200951512`
--
-- --------------------------------------------------------
--
-- Table structure for table `article`
--
CREATE TABLE `article` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`portal` varchar( 16 ) NOT NULL default '',
`day` int( 11 ) NOT NULL default '0',
`subject` varchar( 128 ) NOT NULL default '',
`body` text NOT NULL ,
UNIQUE KEY `id` ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =50

MySQL said: Documentation
#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=50' at line 26
--------------------------------------------------------

Line 26 is the one that starts with ") ENGINE = ...." Any suggestions as to what the problem is?

- Joe
 
what are the version differences between mysql.

It shouldn't hurt to just remove the "DEFAULT CHARSET = latin1" prt and then create the table, you may want to ensure thats teh case before running live and finding it does produce a problem.


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
That means that you're migrating to an older MySQL version. You need to edit the file to remove now-invalid syntax such as DEFAULT CHARSET (though if you do actually depend on that feature, you'll need to redesign your database to suit).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top