Home > Database > Mysql Tutorial > mysql安装后添加gbk字符集的方法_MySQL

mysql安装后添加gbk字符集的方法_MySQL

WBOY
Release: 2016-06-01 13:23:53
Original
890 people have browsed it

bitsCN.com

1、查看当前字符集:


SHOW CHARACTER SET;

2、删除mysql相关目录


rm -rf /usr/local/mysql/*     安装目录
rm -rf /var/lib/mysql/mysql   数据库目录

3、重新编译


./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql --with-charset=gbk --with-collation=gbk_chinese_ci --with-extra-charsets=complex
make clean
make
make install

4、安装后工作:
停止mysql服务。


Pkill -9 mysql
cd /var/lib/mysql/

先把master.info和relay有关的日志全部删掉


rm

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