| :: |
| Author |
Message |
bajam
Joined: 12 Apr 2006
Posts: 17
|
| Posted: Tue Apr 18, 2006 9:26 am Post subject: MySQl Error transfering from |
|
|
I recently sold one of my websites. I transfered backups of the db and the site but my customer keeps getting an error when trying to import the db.
here is the error
Quote: › docWrite("quote")#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
His server is running mysql 4.0.24-max-log and mine runs on 4.1.18-standard. I'm not sure if that makes a difference but I'm thinking that it does as I tested the db backup that I sent and I was able to successfully create a new db on my server.
Can someone tell me how I can get this to work for my customer? |
|
| Back to top |
|
psunite
Joined: 27 Jan 2005
Posts: 6213
Location: Columbus OH
|
| Posted: Tue Apr 18, 2006 11:31 am Post subject: Re: MySQl Error transfering from |
|
|
It is because you are on 4.1 and he is on 4.0 but you can fix that by doing a search and replace.
Search for the string "DEFAULT CHARSET=latin1"
and replace it with single space. Basically you want to delete that character set definition. |
|
| Back to top |
|
bajam
Joined: 12 Apr 2006
Posts: 17
|
| Posted: Tue Apr 18, 2006 11:37 am Post subject: Re: MySQl Error transfering from |
|
|
| thank you so much. I'm going to pass that on. |
|
| Back to top |
|
ooglebay
Joined: 01 Feb 2006
Posts: 58
|
| Posted: Tue Apr 18, 2006 12:16 pm Post subject: Re: MySQl Error transfering from |
|
|
The best method is to use mysqlimport utility if you have shell access. You can make it over ride the default charset defined by your import file, or allow the charset.
I notice the autoincrement value is 1, what if you comment out that line? It could be that in the create table syntax it isn't creating the index and primary key correctly.
More then likely it is the charset because latin is less common if you are importing it onto a windows server. If it is a linux server you can add the latin1 charset. If you choose to over-ride or find-and-replace the default charset, then you might get some errors from the characters not being escaped properly. |
|
| Back to top |
|
| |