SET NAMES 'charset_name' SET CHARACTER SET charset_name SET NAMES 'x'语句与这三个语句等价: mysql> SET character_set_client = x; mysql> SET character_set_results = x; mysql> SET character_set_connection = x; SET CHARACTER SET x语句与这三个语句等价: mysql> SET character_set_client = x; mysql> SET character_set_results = x; mysql> SET collation_connection = @@collation_database; (设置为默认的数据库连接字符集和校对规则)