MySQL export/import problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all,

I have installed MySQL on my Linux Mandrake 10 workstation; I didn't
change any default values (except for the user-accounts). I used a CMS to
create a website which I want to upload to my hosting provider.

When I export my database (using PHPMyAdmin) from my workstation to a
local file and then on the server (again using PHPMyAdmin) I import the
database from the local file, some characters are 'fucked up'.

My local install is MySQL 4.1.2-alpha-standard (from Mandrake RPM) and it
seems that the default character set is utf8 with collation
utf8_general_ci. But some columns in my tables (even within other
databases) use collation latin1_swedish_ci (strange..).

The server install is MySQL 4.0.15. Using mysqladmin with the 'variables'
command, I found out that variable 'character_set' has value 'latin1' and
the variable 'character_sets' has value:

latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos
german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia
hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5

The 'convert_character_set' variable seems to have no value.

I tried creating a database on the server using mysqladmin with the
--default-character-set=utf8, but that also doesn't help. (it doesn't give
any error message, but utf8 is not listed in the 'character_sets' variable)

Does anyone know how to solve this problem?

Much thanks in advance!


Re: MySQL export/import problem

Martin Herrman wrote:
Quoted text here. Click to load it

See my response on your crossposting on comp.databases.

Short answer:  you should use the same version of MySQL in development
as you use in production.

Bill K.

Site Timeline