Which version is my MySQL Server?

前端 未结 4 935
轻奢々
轻奢々 2021-01-05 05:05

What\'s the query syntax to determine the exact version number of the MySQL server software?

相关标签:
4条回答
  • 2021-01-05 05:23

    You can use SHOW VARIABLES:

    SHOW VARIABLES WHERE Variable_name = 'version';

    0 讨论(0)
  • 2021-01-05 05:33

    Command line:

    mysql --version
    
    0 讨论(0)
  • 2021-01-05 05:36

    select version();

    0 讨论(0)
  • 2021-01-05 05:42

    Besides the already mentioned solutions you can simply see the version if you type mysql in your shell. You will get something like this:

    [nikola@localhost]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 386102
    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.
    

    Where you can see that the version is printed in the line Server version: 5.1.61 Source distribution.

    0 讨论(0)
提交回复
热议问题