How to retrieve the current version of a MySQL database management system (DBMS)?

后端 未结 20 2206
忘掉有多难
忘掉有多难 2020-11-28 18:06

What command returns the current version of a MySQL database?

相关标签:
20条回答
  • 2020-11-28 18:15
    E:\>mysql -u root -p
    Enter password: *******
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1026
    Server version: 5.6.34-log MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2016, 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> select @@version;
    +------------+
    | @@version  |
    +------------+
    | 5.6.34-log |
    +------------+
    1 row in set (0.00 sec)
    
    0 讨论(0)
  • 2020-11-28 18:16

    try

    mysql --version
    

    for instance. Or dpkg -l 'mysql-server*'.

    0 讨论(0)
  • 2020-11-28 18:16

    From the console you can try:

    mysqladmin version -u USER -p PASSWD
    
    0 讨论(0)
  • 2020-11-28 18:17

    Simply login to the Mysql with

    mysql -u root -p
    

    Then type in this command

    select @@version;
    

    This will give the result as,

    +-------------------------+
    | @@version               |
    +-------------------------+
    | 5.7.16-0ubuntu0.16.04.1 |
    +-------------------------+
    1 row in set (0.00 sec)
    
    0 讨论(0)
  • 2020-11-28 18:19

    Go to MySQL workbench and log to the server. There is a field called Server Status under MANAGEMENT. Click on Server Status and find out the version.

    Or else go to following location and open cmd -> C:\Windows\System32\cmd.exe. Then hit the command -> mysql -V

    0 讨论(0)
  • 2020-11-28 18:20

    You can also look at the top of the MySQL shell when you first log in. It actually shows the version right there.

    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 67971
    Server version: 5.1.73 Source distribution
    
    Copyright (c) 2000, 2013, 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>
    
    0 讨论(0)
提交回复
热议问题