Home > Database > Mysql Tutorial > body text

更改数据库编码命令_MySQL

WBOY
Release: 2016-06-01 13:32:10
Original
1400 people have browsed it

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 |+———————-+—————–+
Copy after login

 


bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template