久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

macbook - mac 中 mysql 中文亂碼問題

瀏覽:133日期:2022-06-15 09:57:50

問題描述

問題如下: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

終端查詢字符編碼如下:macbook - mac 中 mysql 中文亂碼問題

終端查詢中已經設置成為utf8 編碼

navicat 中查詢macbook - mac 中 mysql 中文亂碼問題

終端查詢帶有中文的數據表macbook - mac 中 mysql 中文亂碼問題

IDE 中 java 查詢數據表macbook - mac 中 mysql 中文亂碼問題

現在問題是 能在navicat 中能夠查詢中文。 在mac終端和java中查詢都是亂碼。 ,求解決。。。。。。。

問題解答

回答1:

已經找到問題所在,就是因為在navicat批量導入sql文件得的時候,mac系統中的navicat會自動把編碼變為default(latin1) ,所以在navicat中看到是正常的中文,而由于在mac終端以及java 設置的編碼都是utf8,所以就產生了亂碼。以后導入sql數據時候需要注意一下!!!

相關文章:
主站蜘蛛池模板: 辰溪县| 临武县| 彝良县| 兴安县| 镇江市| 洛南县| 密山市| 汤原县| 揭西县| 项城市| 如东县| 布尔津县| 南木林县| 东安县| 磐安县| 镇坪县| 惠州市| 宝山区| 井研县| 建昌县| 老河口市| 朝阳县| 溧阳市| 来凤县| 鲁甸县| 石柱| 大洼县| 达州市| 独山县| 华坪县| 玛曲县| 平安县| 沽源县| 和政县| 五家渠市| 康乐县| 乐陵市| 平湖市| 民丰县| 普宁市| 新巴尔虎右旗|