Hi,
I am running into quite a serious problem and I am hoping someone can help me. I have been forced to move my drupal database to another linux distro, and I am running into huge issues trying to install my drupal database.

I just did a mysqldump from my old server and I have the files and everytime I try to upload them I get the following error message:

ERROR 1064 at line 21: 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 7

I am pretty sure the file is not corrupt or anything. I have the mysql dump if that would be helpful to look at. Any help here would be great.

Thanks,
Dave

Comments

Zen’s picture

The problem is that the MySQL versions are different. You've most likely taken the dump from a 4.1.x database and are trying to import it into a 3.23.x database. Go back to your old server and type mysqldump --help to get the syntax and options for the compatability switch and re-export.

You can also use PHPMyAdmin to do this..

hth
-K

lisa’s picture

Hi,
Thanks for pointing me in the right direction but I'm still stuck. I built my test site on a box running MySQL 5.0.11 and tried to migrate it to a server running MySQL 4.1.11

Most content transferred from the mysqldump file properly except for one Latvian character. Latvian has a long a (a with a line over it). It was working fine on my test site, but when I migrated to the server all long a's became double questionmarks (??). (I am building a site where the admin part is in English but the rest is in Latvian.)

I read through mysqldump --help but do not know what option to change. Here are some settings on my old server:

character-sets-dir= (No default value)
compatible=(No default value)
default-character-set=utf8

Should compatible be changed to:
compatible=mysql40

If not, which option or syntax should I adjust to make the migration work?

Thanks

ewilts’s picture

I believe that you should change the compatible option on mysqldump. I had an issue migrating form 4.1 to 4.0 and had a font problem too. I ended up using:

$ mysqldump -u {username} -p --quote-names --opt --compatible mysql40 {databasename}  >output.sql

I then scp'ed output.sql over to the new ISP (which was running 4.0), created a new database, imported the file with:

$ mysql -u {username} -p {databasename} <~/output.sql

and everything seemed to work fine.

Ed Wilts
Mounds View, MN
mailto:ewilts@ewilts.org

sunydayclub’s picture

I have create the drupal evaluation site for my study on drupal cms.
Here is my new drupal site

crea5e’s picture

the answer.. delete the part of the line that goes

ENGINE=MyISAM DEFAULT CHARSET=latin1
AUTO_INCREMENT=1 for each table

then it should import correctly