[thelist] trying to remove default charset from mysql dump

Hassan Schroeder hassan at webtuitive.com
Fri Dec 2 12:03:49 CST 2005

Sarah Adams 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:
>    CREATE TABLE Users(
>      ...
> 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?

1) it sounds like you have a MySQL version mismatch, and your dev
   version is really old :-)

   If so, upgrading would be a good idea.

2) alternately: run `mysqldump --no-data` to get *only* the create
   table statements, which you can easily edit; then you can run
   `mysqldump --no-create-info` to get the data.

Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                          dream.  code.

More information about the thelist mailing list