作者:dsjdsjdsjjk_896 | 来源:互联网 | 2020-10-02 20:38
mysql设置编码的命令是:【SETcharacter_set_databaseutf8;】。我们可以通过执行【SHOWVARIABLESLIKE%set%;】命令来查看数据库编码。
mysql设置编码的命令是:【SET character_set_database = utf8;】。我们可以通过执行【SHOW VARIABLES LIKE '%set%';】命令来查看数据库编码。
一、查看编码
(推荐教程:mysql视频教程)
SHOW VARIABLES LIKE '%set%';
二、将编码设置为UTF-8
SET character_set_client = utf8;
SET character_set_cOnnection= utf8;
SET character_set_database = utf8;
SET character_set_database = utf8;
SET character_set_results = utf8;
SET character_set_server = utf8;
SET character_set_system = utf8;