首頁 >資料庫 >mysql教程 >mysql编码查看及设置命令_MySQL

mysql编码查看及设置命令_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-01 13:46:031058瀏覽

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
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn