更改数据库编码命令_MySQL
程序员文章站
2022-04-07 13:43:23
...
bitsCN.com
bitsCN.com
更改数据库编码命令
修改字符集的方法,就是使用mysql的命令
mysql> SET character_set_client = utf8 ;mysql> SET character_set_connection = utf8 ;使用 mysql> SHOW VARIABLES LIKE ‘character%’;查看,发现数据库编码均已改成utf8+————————–+———————————+| Variable_name | &#118alue |+————————–+———————————+| character_set_client | utf8 || character_set_connection | utf8 || character_set_database | utf8 || character_set_filesystem | binary || character_set_results | utf8 || character_set_server | utf8 || character_set_system | utf8 || character_sets_dir | D:”mysql-5.0.37″share”charsets” |+————————–+———————————+mysql> SHOW VARIABLES LIKE ‘collation_%’;+———————-+—————–+| Variable_name | &#118alue |+———————-+—————–+| collation_connection | utf8_general_ci || collation_database | utf8_general_ci || collation_server | utf8_general_ci |+———————-+—————–+
bitsCN.com