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

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

What command returns the current version of a MySQL database?

20条回答
  •  感动是毒
    2020-11-28 18:28

    With CLI in one line :

    mysql --user=root --password=pass --host=localhost db_name --execute='select version()';

    or

    mysql -uroot -ppass -hlocalhost db_name -e 'select version()';

    return something like this :

    +-----------+
    | version() |
    +-----------+
    | 5.6.34    |
    +-----------+
    

提交回复
热议问题