utf 8 - MySQL, Altering Table from Latin-1 to UTF-8 -
I want to remove new entries in my Latin-1 characters database and just allow UTF-8. I am planning to make changes to the table and make the following changes:
Charset: latin1 -> utf-8
< P> Code: Latin 1_swishish_c -> utf8_general_ciThere is 1 million lines in the table in question, is this a good idea? What are the risks of doing this? What happens to the data that I try to input that is not in utf-8? What is UTF-8, what happens to the data that has been previously entered?
You should create a table duplicate, start a transaction, enter all the rows from the old table, And then commit. The safest way.
To summarize:
Duplicate the Make Table ... (the condition you like, etc) SET AUTOCOMMIT = 0; Start transactions; Duplicate INSERT (... field-list ...) SELECT (... field-list ...) from original_tables; COMMIT; Optional table for basic basic basic return; Repeat duplicates in the original table;
You should be careful of unique indexes and auto-fielding areas. Make sure to create duplicate tables without indexing, hurry to insert, then add them.
Comments
Post a Comment