0
I use MySQL 5.1 version

I have a MySQL table 'server_info' which has 2 columns 'server_id' as well as 'server_details' of which the character set of 'server_details' column was 'latin1' and i have 100 rows of data in the table. Now, I got some error while updating the table with some specific string values. Error message follows

'Incorrect String value for column server_details....'

Which i realized that was due to the different character set.

So i decide to change my character to 'utf-8' to support the new string as well.

  • If i change the character set will the existing data affected?

  • what will happen to the existing data?

  • What all things i should be careful about before doing this conversion?

  • Is this conversion, the right fix for my problem?

While i checked in MySQL 5.6 version The conversion gave me a messgage that '100 rows are affected' Does that mean existing data also got converted to the new character set?

  • If Yes, Will this be the same behaviour i can expect in MySQL 5.1 version also?
Jithin Kumar
  • 49
  • 1
  • 9
  • Please provide `SELECT col, HEX(col) FROM ... WHERE ...` so we can see if the problem was during `INSERTion` or during `SELECTing`. Also provide `SHOW CREATE TABLE`. – Rick James Aug 01 '15 at 05:32

1 Answers1

0

If you change the Character Set there will be no impact on the existing values. Because during the insertion the data lost ( or doesn't aware of) some extra information about the Character Set. To fix this problem you have to convert the text manually.

Md Mahfuzur Rahman
  • 2,319
  • 2
  • 18
  • 28