Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
102
Help us understand the problem. What is going on with this article?
@rokumura7

MySQLのバージョン確認方法

More than 3 years have passed since last update.

接続前なら

  $ mysql --version
  mysql  Ver 14.14 Distrib 5.7.21, for osx10.13 (x86_64) using  EditLine wrapper

接続後なら

  mysql> select version();
  +-----------+
  | version() |
  +-----------+
  | 5.7.21    |
  +-----------+
  1 row in set (0.01 sec)

mysqladminやstatusを使えばより詳細に色々分かる。

接続前

  $ mysqladmin version
  mysqladmin  Ver 8.42 Distrib 5.7.21, for osx10.13 on x86_64
  Copyright (c) 2000, 2018, 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.

  Server version        5.7.21
  Protocol version  10
  Connection        Localhost via UNIX socket
  UNIX socket       /tmp/mysql.sock
  Uptime:           4 min 53 sec

  Threads: 1  Questions: 2  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.006

接続後

  mysql> status
  --------------
  mysql  Ver 14.14 Distrib 5.7.21, for osx10.13 (x86_64) using  EditLine wrapper

  Connection id:        3
  Current database:
  Current user:     root@localhost
  SSL:          Not in use
  Current pager:        stdout
  Using outfile:        ''
  Using delimiter:  ;
  Server version:       5.7.21 Homebrew
  Protocol version: 10
  Connection:       Localhost via UNIX socket
  Server characterset:  utf8
  Db     characterset:  utf8
  Client characterset:  utf8
  Conn.  characterset:  utf8
  UNIX socket:      /tmp/mysql.sock
  Uptime:           6 min 14 sec

  Threads: 1  Questions: 7  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.018
  --------------

おしまい。

102
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
rokumura7
サーバサイドエンジニア。Javaが好き。正社員になるためフリーランスでリハビリ中。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
102
Help us understand the problem. What is going on with this article?