While migrating data from one database to another in mysql, I hit with a small issue.
it’s was changing to itâs in the database and get rendered as it’s on the website
Solution
For a varchar(255) column named “column_name” in a table named “example_table”:
ALTER TABLE example_table MODIFY column_name BINARY(255);
ALTER TABLE example_table MODIFY column_name VARCHAR(255) CHARACTER SET utf8;
For a text column named “text_column_name” in a table named “example_table”:
ALTER TABLE example_table MODIFY text_column_name BLOB;
ALTER TABLE example_table MODIFY text_column_name TEXT CHARACTER SET utf8;
reference
No comments:
Post a Comment