1月 082013
 

mysqlコマンドで調べる

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.25, for Linux (i686) using readline 5.1

mysqlサーバに接続して調べる

$ 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編)

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編)

mysql> SELECT version();
+-----------+
| version() |
+-----------+
| 5.5.25    |
+-----------+
1 row in set (0.00 sec)

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>