mysqlコマンドで調べる
1 2 |
$ mysql --version mysql Ver 14.14 Distrib 5.5.25, for Linux (i686) using readline 5.1 |
mysqlサーバに接続して調べる
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ mysql -u root -pxxxx testdb Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 3 Server version: 5.5.25 MySQL Community Server (GPL) by Remi 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サーバに接続後に調べる (STATUS編)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
mysql> status -------------- mysql Ver 14.14 Distrib 5.5.25, for Linux (i686) using readline 5.1 Connection id: 3 Current database: testdb Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.5.25 MySQL Community Server (GPL) by Remi Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: utf8 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 7 min 58 sec Threads: 1 Questions: 21 Slow queries: 0 Opens: 14 Flush tables: 1 Open tables: 8 Queries per second avg: 0.043 -------------- |
mysqlサーバ接続後に調べる(SELECT編)
1 2 3 4 5 6 7 |
mysql> SELECT version(); +-----------+ | version() | +-----------+ | 5.5.25 | +-----------+ 1 row in set (0.00 sec) |
/