0

I tried INSERT INTO guest VALUES (3, 'Hello','',NOW(),'author'); into my database, but it seems that it can't even enter the data.

It shows,

mysql> INSERT INTO guest VALUES (3, 'Hello','��',NOW(),'author');
    '>

I changed and checked the settings from utf8 to utf8mb4 as well.

mysql> show variables like 'c%';
+----------------------------------------------+---------------------------------------------------------+
| Variable_name                                | Value                                                   |
+----------------------------------------------+---------------------------------------------------------+
| caching_sha2_password_auto_generate_rsa_keys | ON                                                      |
| caching_sha2_password_private_key_path       | private_key.pem                                         |
| caching_sha2_password_public_key_path        | public_key.pem                                          |
| character_set_client                         | utf8mb4                                                 |
| character_set_connection                     | utf8mb4                                                 |
| character_set_database                       | utf8mb4                                                 |
| character_set_filesystem                     | binary                                                  |
| character_set_results                        | utf8mb4                                                 |
| character_set_server                         | utf8mb4                                                 |
| character_set_system                         | utf8                                                    |
| character_sets_dir                           | C:\Program Files\MySQL\MySQL Server 8.0\share\charsets\ |
| check_proxy_users                            | OFF                                                     |
| collation_connection                         | utf8mb4_0900_ai_ci                                      |
| collation_database                           | utf8mb4_general_ci                                      |
| collation_server                             | utf8mb4_0900_ai_ci                                      |
| completion_type                              | NO_CHAIN                                                |
| concurrent_insert                            | AUTO                                                    |
| connect_timeout                              | 10                                                      |
| core_file                                    | OFF                                                     |
| create_admin_listener_thread                 | OFF                                                     |
| cte_max_recursion_depth                      | 1000                                                    |
+----------------------------------------------+---------------------------------------------------------+
21 rows in set, 1 warning (0.00 sec)

What should be done to insert that imoji into my database?

  • You need to change your character set, see here: https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database – Alex Collette Jan 11 '21 at 10:12
  • 2
    Does this answer your question? [How to store Emoji Character in MySQL Database](https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database) – Alex Collette Jan 11 '21 at 10:12
  • I did change my character set. It seems that my cmd window does not support imoji i guess? This is my cmd window screenshot. https://ibb.co/Pcd2svp – woohyun.park Jan 11 '21 at 10:25

0 Answers0