- 追加された行はこの色です。
- 削除された行はこの色です。
- iptables へ行く。
*概要 [#v08e2f21]
-DebianにMySQLを入れて、phpMyAdminで表示すると日本語が文字化けする。
*対策 [#q83e498f]
debian:~# emacs /etc/mysql/my.cnf
[client]
default-character-set = utf8
*初期設定の確認 [#s5d06e18]
# iptables -L -t filter
Chain INPUT (policy ACCEPT)
target prot opt source destination
[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
Chain FORWARD (policy ACCEPT)
target prot opt source destination
[mysqldump]
default-character-set = utf8
[mysql]
default-character-set = utf8
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
*MySQLの再起動 [#ke9ec1c4]
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..
*確認方法 [#x7dfd3ed]
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
# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
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
--------------
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
*参考 [#l0190c85]
-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
*iptables.shの作成 [#i133c81d]
-参考サイトを参考に作成
# chmod 700 iptables.sh
# iptables -L
# /etc/rc.d/init.d/iptables save
-FTPのPASVモードに対応したいときはモジュール読み込んでおく。
#LoadModule
modprobe ip_nat_ftp
modprobe ip_conntrack_ftp
*参考サイト [#c9355f42]
-[[連載記事 「習うより慣れろ! iptablesテンプレート集」>http://www.atmarkit.co.jp/flinux/index/indexfiles/iptablesindex.html]]
-[[Linux/iptablesでルータを作る >http://www.dream-seed.com/pukiwiki/index.php?Linux%2Fiptables%A4%C7%A5%EB%A1%BC%A5%BF%A4%F2%BA%EE%A4%EB]]
-[[Debianでルータ構築>http://team2ch.org/blog/?page_id=224]](設定例は-が足りないところがある)
----
Debian MySQL 文字化け phpMyAdmin UTF-8 文字コード~
&size(12){Total:&counter(total); / Today:&counter(today); / Yesterday:&counter(yesterday);};