mysql5.5 to modify the character set server-side and client character set methods
# # # #下面两行没配置将导致dos下乱码 # #
[Client]
Default-character-set=utf8
[MySQL]
Default-character-set=utf8
##### statement for #下面是配置utf-8 #########
[Mysqld]
Character-set-server=utf8
init_connect= ' SET collation_connection = Utf8_unicode_ci '
init_connect= ' SET NAMES UTF8 '
Collation-server=utf8_unicode_ci
Skip-character-set-client-handshake
########### #mysql建表的一些语句模板, the correct ####### of guaranteed character sets and engines can be modified on this basis
-
create table
-
" Id ' int not null AUTO_INCREMENT,
' Workername ' varchar( not NULL),
' Sex ' enum (f,m,s),
-
" Salary ' int default ' 0 ' ,  
' Email ' varchar(+),
' Employeddates ' date,
-
" Department ' varchar
-
< span class= "keyword" style= "Margin:0px;padding:0px;border:none;color:rgb (0,102,153); font-weight:bold; Background-color:inherit; " >primary key (' id ')
) Engine=myisam DEFAULT Charset=utf8;
Reference: http://yanue.net/post-134.html
This article is from the "Bobo Road" blog, please be sure to keep this source http://shiyiguo.blog.51cto.com/4949751/1782231
mysql5.5 to modify the character set server-side and client character set methods