Home  >  Article  >  Database  >  更改数据库编码命令_MySQL

更改数据库编码命令_MySQL

WBOY
WBOYOriginal
2016-06-01 13:32:101370browse

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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn