#navi(../)
* mysqlのバージョンを調べる方法 [#k3852f04]
mysqlのバージョンを確認する方法を以下に記します。

#contents
#htmlinsertpcsp(db-top.html,db-sp.html)

* mysqlコマンドにversionオプションを付け実行 [#oc1c490f]
mysqlコマンドに''--version''オプションを付け実行した場合の出力です。

 [sakura@centos6 ~]$ mysql --version
 mysql  Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1

* mysqladminコマンドにversionオプションを付け実行 [#zf708f52]
mysqlコマンドに''--version''オプションを付け実行した場合の出力です。

 [sakura@centos6 ~]$ mysqladmin --version
 mysqladmin  Ver 8.42 Distrib 5.1.61, for redhat-linux-gnu on x86_64

* mysql接続時のバージョン表示 [#a4d50c20]
mysqlコマンドで接続すると、Server versionが表示されます。

 [sakura@centos6 ~]$ mysql
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 5
 Server version: 5.1.61 Source distribution
 
 Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 
 Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.
 
 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
 mysql>quit

* statusコマンドを利用しバージョン確認を行う方法 [#k20fc609]
以下、mysql接続後に''status''コマンドを発行したときの出力です。~
Server versionバージョンの項目があります。

 mysql> status
 --------------
 mysql  Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1
 
 Connection id:          8
 Current database:
 Current user:           sakura@localhost
 SSL:                    Not in use
 Current pager:          stdout
 Using outfile:          ''
 Using delimiter:        ;
 Server version:         5.1.61 Source distribution
 Protocol version:       10
 Connection:             Localhost via UNIX socket
 Server characterset:    latin1
 Db     characterset:    latin1
 Client characterset:    latin1
 Conn.  characterset:    latin1
 UNIX socket:            /var/lib/mysql/mysql.sock
 Uptime:                 4 min 11 sec
 
 Threads: 1  Questions: 16  Slow queries: 0  Opens: 15  Flush tables: 1  Open tables: 8  Queries per second avg: 0.63
 --------------

* version関数を利用してバージョンを確認する方法 [#gf545b68]
mysqlに接続し、version関数を利用した場合の出力です。~
 mysql> select version();
 +-----------+
 | version() |
 +-----------+
 | 5.1.61    |
 +-----------+
 1 row in set (0.00 sec)

#htmlinsertpcsp(db-btm.html,db-sp.html)

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