*概要 [#x34d7c3f]
-DebianにMySQLを入れて、phpMyAdminで表示すると日本語が文字化けする。

*対策 [#a849e721]
 debian:~# emacs /etc/mysql/my.cnf

 [client]
 default-character-set = utf8
 
 [mysqld]
 skip-external-locking
 character-set-server = utf8
 collation-server = utf8_general_ci
 init-connect = SET NAMES utf8
 default-character-set = utf8
 skip-character-set-client-handshake
 
 [mysqldump]
 default-character-set = utf8
 
 [mysql]
 default-character-set = utf8

*MySQLの再起動 [#e79fe726]
 debian:~# /etc/init.d/mysql restart
 Stopping MySQL database server: mysqld.
 Starting MySQL database server: mysqld.
 Checking for corrupt, not cleanly closed and upgrade needing tables..

*確認方法 [#x811511c]
 debian:~# mysql -u root -p
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 87
 Server version: 5.0.32-Debian_7etch11-log Debian etch distribution
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 mysql> status;
 --------------
 mysql  Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
 
 Connection id:          87
 Current database:
 Current user:           root@localhost
 SSL:                    Not in use
 Current pager:          stdout
 Using outfile:          ''
 Using delimiter:        ;
 Server version:         5.0.32-Debian_7etch11-log Debian etch distribution
 Protocol version:       10
 Connection:             Localhost via UNIX socket
 Server characterset:    utf8
 Db     characterset:    utf8
 Client characterset:    utf8
 Conn.  characterset:    utf8
 UNIX socket:            /var/run/mysqld/mysqld.sock
 Uptime:                 19 min 18 sec
 
 Threads: 1  Questions: 1187  Slow queries: 0  Opens: 143  Flush tables: 1  Open tables: 19  Queries per second avg: 1.025
 --------------

 
*参考 [#tf572a77]
-http://iandeth.dyndns.org/mt/ian/archives/000108.html#c
-http://plaza.rakuten.co.jp/nattokobu/diary/200612200000/
-http://www.my-standard.co.jp/331.html
-http://modperlis.bounceme.net/2009/03/movabletype41mysqllatin1utf8.html 

----
Debian MySQL 文字化け phpMyAdmin UTF-8 文字コード~
&size(12){Total:&counter(total); / Today:&counter(today); / Yesterday:&counter(yesterday);};

トップ   差分 バックアップ リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS