mac mysql 中文_mac 中 mysql 中文乱码问题

问题如下:

mac 系统版本 10.12.2

mysql 数据版本 5.6.35-macos10.12-x86_64

现在已经在/etc/my.cnf 中添加utf8编码

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

# *** default location during install, and will be replaced if you

# *** upgrade to a newer version of MySQL.

[mysqld] character-set-server=utf8

# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log_bin

# These are commonly set, remove the # and set as required.

# basedir = .....

# datadir = .....

# port = .....

# server_id = .....

# socket = .....

[client] default-character-set=utf8

终端查询字符编码如下:

66752dbaf9594b1ed0aba11f4a46634b.png

终端查询中已经设置成为utf8 编码

navicat 中查询

f1ffd501482e5cd3992690ce7c6014cf.png

终端查询带有中文的数据表

520ff01739be2844f51e6512761ea0d0.png

IDE 中 java 查询数据表

6ce7da53addc672f0f868086f0f9bc0e.png

现在问题是 能在navicat 中能够查询中文。 在mac终端和java中查询都是乱码。 ,求解决。。。。。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值