Home > Database > Mysql Tutorial > body text

mysql重装后出现乱码解决办法_MySQL

WBOY
Release: 2016-06-01 13:32:20
Original
1041 people have browsed it

bitsCN.com

mysql重装后出现乱码解决办法

 

查看当前连接系统参数:

SHOW VARIABLES LIKE '%char%';mysql> show variables like 'char%';+--------------------------+----------------| Variable_name            | Value+--------------------------+----------------| character_set_client     | gbk| character_set_connection | gbk| character_set_database   | latin1| character_set_filesystem | binary| character_set_results    | gbk| character_set_server     | latin1| character_set_system     | utf8| character_sets_dir       | C:/+--------------------------+----------------8 rows in set (0.00 sec) mysql>
Copy after login

只能在配置文件中将database 和 server 字符集 设置为utf8 ,否则不起作用

在命令行 :停止命令:

net stop mysql
Copy after login

启动命令:

net start mysql
Copy after login

mysql核心配置文件 my.ini

[mysql] 主要配置命令行客户端参数 default-character-set=utf8 ---- 影响 client、connection、result

[mysqld] 配置服务器参数 character-set-server=utf8 ----- 影响 database server

mysql添加function函数的时候 先设置

set global log_bin_trust_function_creators=1;  指定参数  否则创建不成功
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!