トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   一覧 最終更新   ヘルプ   最終更新のRSS
 


動作確認ディストリビューション

MySQLの文字コードの確認方法

ここではMySQLの文字コードの確認方法を紹介します。

# /usr/local/mysql/bin/mysql -u root -p

mysql> status
--------------
/usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.5.9, for Linux (i686) using  EditLine wrapper

Connection id:          2
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.9-log Source distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /tmp/mysql.sock
Uptime:                 11 min 6 sec

Threads: 1  Questions: 7  Slow queries: 0  Opens: 33  Flush tables: 1  Open tables: 26  Queries per second avg: 0.10
--------------

または、

mysql> show variables like 'character_set%';
+--------------------------+----------------------------------+
| Variable_name            | Value                            |
+--------------------------+----------------------------------+
| character_set_client     | utf8                             |
| character_set_connection | utf8                             |
| character_set_database   | latin1                           |
| character_set_filesystem | binary                           |
| character_set_results    | utf8                             |
| character_set_server     | latin1                           |
| character_set_system     | utf8                             |
| character_sets_dir       | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.01 sec)

Last-modified: 2011-03-05 (土) 10:59:39 (2842d)