How to store Emoji Character in MySQL Database

后端 未结 16 2254
迷失自我
迷失自我 2020-11-22 05:34

I am using Emoji character in my project. That characters are saved (??) into mysql database. I had used database Default collation in utf8mb4_general_ci. It sh

16条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 06:31

    For anyone trying to solve this on a managed MySQL instance (in my case on AWS RDS), the easiest way was to modify the parameter group and set the server character set and collation to be utf8mb4 and utf8mb4_bin, respectively. After rebooting the server, a quick query verifies the settings for system databases and any newly created ones:

    SELECT * FROM information_schema.SCHEMATA S;
    

提交回复
热议问题