自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Ubuntu mysql編譯亂碼終于成功

系統(tǒng) Linux
先看下面注意內容整整弄了一天,終于解決了jdbc(mysql-connector-java-5.0.30)和Ubuntu mysql通信中文亂碼的問題!我的系統(tǒng)是linux(Ubuntu)。在java中(Myeclipse環(huán)境)使用hibernate連接Ubuntu mysql。

Ubuntu mysql系統(tǒng)的特性,并結合應用實例進行講解,既可作為高校計算機專業(yè)Ubuntu mysql學習,也可以作為Ubuntu mysql系統(tǒng)開源愛好者、Ubuntu mysql系統(tǒng)用戶的學習。

先看下面注意內容整整弄了一天,終于解決了jdbc(mysql-connector-java-5.0.30)和Ubuntu mysql通信中文亂碼的問題!我的系統(tǒng)是linux(Ubuntu)。在java中(Myeclipse環(huán)境)使用hibernate連接Ubuntu mysql。存儲英文沒問題,寫(insertinto)和讀(select)都能正確顯示,但是若其中帶有中文字符就成亂碼了。到網(wǎng)上查找了半天資料,***終于成功。

我的解決方法是,在/etc/my.cnf文件中加上以下兩行內容:
[client]default-character-set=utf8[mysqld]default-character-set=utf8
注意,這個文件不一定存在,需將 /安裝原文件/support-files/my-medium.cnf 復制到/etc/下,重命名
需重啟Ubuntu mysql
停用:sudo /usr/local/mysql/bin/mysqladmin shutdown
啟用sudo /usr/local/mysql/bin/mysqld_safe -user=mysql &

查看Ubuntu mysql編碼

啟用后sudo /usr/local/mysql/bin/mysql
mysql>show variables like 'character%';
Variable_name Value
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/

注意,Ubuntu mysql這樣改變后原先所建數(shù)據(jù)庫似乎不能用(不確定),盡量備份新建數(shù)據(jù)庫,就不會有亂碼了。
 screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.cublog.cn/images/face/001.gif');}" onmousewheel="return imgzoom(this);" alt="" />

【編輯推薦】

  1. Ubuntu MySQL安裝與配置文件
  2. 安裝Ubuntu mysql解壓配置編譯
  3. Ubuntu mysql配置安裝建立連接
  4. Ubuntu mysql服務器安裝布局
  5. Ubuntu aptitude安裝可用的軟件包
責任編輯:佚名 來源: CSDN
相關推薦

2010-01-07 16:47:01

2023-06-07 19:17:14

UbuntuKDELinux

2011-07-05 14:29:44

Ubuntu QT Mysql

2010-02-06 16:13:49

Ubuntu Auda

2011-08-30 10:36:31

Ubuntu 9.04Mysql ProxyLua

2009-11-09 09:56:46

Driver Stud

2010-02-22 09:33:37

Ubuntu MySQ

2010-01-04 10:06:56

Ubuntu gcc

2009-12-29 11:11:10

2010-01-08 09:58:42

Ubuntu Secu

2017-09-14 16:28:45

中安威士

2021-10-20 12:30:34

UbuntuUbuntu 21.1Linux

2009-05-08 16:41:47

LinuxUbuntu秘訣

2009-09-17 16:48:52

Ubuntu Day開源

2009-12-30 16:38:44

Ubuntu內核

2010-01-07 14:31:59

Ubuntu編譯

2009-12-30 09:22:01

Ubuntu編譯

2010-02-05 11:00:33

Ubuntu GCC

2023-03-09 11:02:40

linux編譯源碼

2010-01-07 16:34:08

Ubuntu apac
點贊
收藏

51CTO技術棧公眾號