偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Ubuntu mysql編譯亂碼終于成功

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

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

先看下面注意內(nèi)容整整弄了一天,終于解決了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文件中加上以下兩行內(nèi)容:
[client]default-character-set=utf8[mysqld]default-character-set=utf8
注意,這個(gè)文件不一定存在,需將 /安裝原文件/support-files/my-medium.cnf 復(fù)制到/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ù)庫,就不會(huì)有亂碼了。
 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服務(wù)器安裝布局
  5. Ubuntu aptitude安裝可用的軟件包
責(zé)任編輯:佚名 來源: CSDN
相關(guān)推薦

2023-06-07 19:17:14

UbuntuKDELinux

2010-01-07 16:47:01

2011-07-05 14:29:44

Ubuntu QT Mysql

2010-02-06 16:13:49

Ubuntu Auda

2009-11-09 09:56:46

Driver Stud

2011-08-30 10:36:31

Ubuntu 9.04Mysql ProxyLua

2010-02-22 09:33:37

Ubuntu MySQ

2009-12-29 11:11:10

2010-01-04 10:06:56

Ubuntu gcc

2017-09-14 16:28:45

中安威士

2021-10-20 12:30:34

UbuntuUbuntu 21.1Linux

2010-01-08 09:58:42

Ubuntu Secu

2009-05-08 16:41:47

LinuxUbuntu秘訣

2009-09-17 16:48:52

Ubuntu Day開源

2021-09-06 07:59:13

Go編譯器語言

2010-02-06 17:08:58

Ubuntu ngin

2014-12-17 10:37:38

UbuntuHadoop

2010-01-04 18:56:06

Ubuntu內(nèi)核

2009-12-30 16:38:44

Ubuntu內(nèi)核

2010-01-07 16:34:08

Ubuntu apac
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號