[thelist] trying to remove default charset from mysql dump
James Hardy
list.weeble at googlemail.com
Fri Dec 2 12:40:14 CST 2005
On 02/12/05, Sarah Adams <mrsanders at designshift.com> wrote:
> I'm trying to copy the database from my client's server to my
> development machine. But when I run mysqldump, the CREATE TABLE
> statements come out like this:
>
> DROP TABLE IF EXISTS Users;
> CREATE TABLE Users(
> ...
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
>
> I get the following error when I try to import the data into my
> development database:
>
> ERROR 1064 at line 12: 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 10
>
> I could edit the text file to manually remove all instances of this, but
> the database is huge, and trying to open the dump file in my text editor
> just causes the text editor to freeze. Any suggestions as to how to run
> the dump without getting "DEFAULT CHARSET=latin1" in the output?
>
> --
> sarah adams
> web developer & programmer
> portfolio: http://sarah.designshift.com
> blog: http://hardedge.ca
> --
>
I had this exact problem, I was using MySQL Administrator 1.0.20 on
the original machine and MySQL Administrator 1.0.19 on the destination
machine. (Yes I know if I was a REAL programmer I would be using
something a little more hardcore, but hey, I'm lazy)
I thought that it wouldn't make a difference being only a minor point
difference, but it seems that it did.
Once I had upgraded the destination it worked ok. So I guess it is a
difference in the clients between the machines, or possibly server
versions.
You could always open the SQL in a text editor and do a search and
replace, or a regex if it going to get more complicated.
--
James Hardy
--
James Hardy
More information about the thelist
mailing list