您好,登錄后才能下訂單哦!
這篇文章主要講解了“編譯安裝mysql 5.1出現亂碼怎么辦”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“編譯安裝mysql 5.1出現亂碼怎么辦”吧!
1. yum install –y gcc gcc-c++ ncurses-devel bison
2.shell> groupadd mysql shell> useradd -g mysql mysql shell> gunzip < mysql-5.1.55.tar.gz | tar -xvf - shell> cd mysql-5.1.55 shell> ./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all --enable-assembler --enable-thread-safe-client --with-big-tables --with-readline --with-plugins=innodb_pluginshell> make shell> make install shell> cp support-files/my-medium.cnf /etc/my.cnf shell> cd /usr/local/mysql shell> bin/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql var shell> chgrp -R mysql . shell> bin/mysqld_safe --user=mysql & 4.這樣裝完以后竟然還是+--------------------------+----------------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------------+
| auto_increment_offset | 1 |
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/mysql/charsets/ |
+--------------------------+----------------------------------------+最后在my.cnf中設置 [mysqld]和[client] 中設置:default-character-set=utf8.但是中還是中還是亂碼,為了不改程序.終于找到方法了原文地址--[d]加入
default-character-set=utf8
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake完美解決!!
感謝各位的閱讀,以上就是“編譯安裝mysql 5.1出現亂碼怎么辦”的內容了,經過本文的學習后,相信大家對編譯安裝mysql 5.1出現亂碼怎么辦這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。