用MySQL連結myeclipse的亂碼

來源:互聯網
上載者:User

用MySQL連結到myeclipse 會遇到亂碼問題,我想這也是很多人遇到的問題,下面我來講解一下到底如何解決這些亂碼問題,

首先在MySQL能夠正常顯示,但是卻連結到myeclipse中建立好dbbrowser後,右鍵connected to mysql 後,單擊New SQL editor 出來之後,查看錶裡的內容,出現的是亂碼,這有可能是mysql編碼配置的問題,應該作如下更改,找到mysql的設定檔夾my.ini,作如下修改 。

[client]

port=3306

[mysql]

default-character-set=GBK    //這是需要更改的地方,有人可能會是latin1

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this 
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

#Path to installation directory. All paths are usually resolved relative to this.
basedir="E:/Mysql/mysql sever/"

#Path to the database root
datadir="E:/Mysql/mysql sever/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=utf8   //這是mysql本地的字元存取,需要更改  有人可能會是latin1

 

改好之後,去控制台服務裡面 先把mysql的服務關掉然後再重新啟動(這很重要),然後再刪掉原有舊編碼的表,這樣建立的新表,在myeclipse中就不會有亂碼的問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.