Home > Database > Mysql Tutorial > body text

mysql编码查看及设置命令_MySQL

WBOY
Release: 2016-06-01 13:46:03
Original
1019 people have browsed it

bitsCN.com

 

--查看数据库的字符集

show variables like 'character/_set/_%';

show variables like 'collation_%';

 

--设置数据库字符编码

set names 'GBK'

alter database payment character set GBK;

create database mydb character set GBK;

set character_set_client=gbk;

set character_set_connection=gbk;

set character_set_database=gbk;

set character_set_results=gbk;

set character_set_server=gbk;

set character_set_system=gbk;

set collation_connection=gbk;

set collation_database=gbk;

set collation_server=gbk;

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