The following query will transcode the table to accept four-byte utf8 characters, without any loss of datas. It is essential to specify the names of the columns to be transcribed)
ALTER TABLE t1
DEFAULT CHARACTER SET utf8mb4,
MODIFY col1 CHAR(10)
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
MODIFY col2 CHAR(10)
CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL;
More simply, you can use :
ALTER TABLE t1
CONVERT TO CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
You don't have to give the column names; only those columns requiring transcoding will be transcoded automatically.
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons