溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Ubuntu mysql編譯亂碼的解決方法

發(fā)布時間:2021-09-16 11:27:26 來源:億速云 閱讀:135 作者:chen 欄目:系統(tǒng)運維

這篇文章主要講解了“Ubuntu mysql編譯亂碼的解決方法”,文中的講解內(nèi)容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“Ubuntu mysql編譯亂碼的解決方法”吧!

我的解決方法是,在/etc/my.cnf文件中加上以下兩行內(nèi)容:
[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('https://cache.yisu.com/upload/information/20210521/367/443009.gif');}" onmousewheel="return imgzoom(this);" alt="" />

感謝各位的閱讀,以上就是“Ubuntu mysql編譯亂碼的解決方法”的內(nèi)容了,經(jīng)過本文的學習后,相信大家對Ubuntu mysql編譯亂碼的解決方法這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI