Mysql database garbled

the data saved to the database after registering directly on the registration page is garbled, but it will not be garbled if I open the database directly with the command line or phpmyadmin open the database and insert the data directly. What is the reason for this? As shown in the figure!

Mar.05,2021

garbled code occurs because the format used in encoding and decoding is not consistent. You need to modify the encoding format in the database and code:

1. utf-8 
(:https://www.cnblogs.com/liyingxiang/p/5877764.html)
2.
3.
    set names gbk /set names uft8 
Menu