We help IT Professionals succeed at work.

mysql Collation says latin?

jackjohnson44
on
498 Views
Last Modified: 2012-06-27
I have a mysql db that I am trying to move to another server.
I am not sure the version of either.

On my version, when I output, i have a line after the table definition that says "CHARSET=latin1".
The db I am trying to import to gives an error on this line.

How do I get rid of it, or have something that is compatable with all versions of mysql?

I want a varchar, without any other settings.
Comment
Watch Question

Top Expert 2006

Commented:
hi, the collation is how it treats the text and how it is saved.  for example if you have information stored in arabic you would have a different collation.

It should be supported by all servers, however they normally have a default collation - if you remove the collation arguement and then run it it will just default to whatever is the default collation,

If you do this, then run the command,

show create table - in your new database it will indicate what collation is being used.
Kim RyanIT Consultant

Commented:
Collation was introduce in MySQL 4.1, so perhaps your current version is earlier than this? You can just remove the "CHARSET=latin1" text and then start to import your data.

Author

Commented:
is there a way to do something to my database to covert it for me to an older version so I don't have to do this every time I move from one to the other?
Kim RyanIT Consultant

Commented:
yes, with mysqldump use this option
--compatible=mysql323
--compatible=mysql40
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.