How can I find out the version of MySql?

Possible duplicate:
What version of my MySQL server?

As the question shows, how can I find out the mysql server version using the terminal?

+3
source share
6 answers

If you have the mysql client installed, you can use it to connect to the database server and issue the following statement:

SELECT VERSION();

For example, you can use this:

echo SELECT VERSION() | mysql -u foo ...other parameters here...

The result will look something like this:

VERSION ()
5.1.41-community
+6
source

The STATUS command displays the version as well as information about the version comments. For instance:

mysql> STATUS;

+2
source

, , :

mysql -V
+1

mysql. - :

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 205
Server version: 5.1.53 MySQL Community Server (GPL)

mysql -V also works and outputs something like this:

/usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.1.53, for apple-darwin10.3.0 (i386) using readline 5.1
+1
source

There are several ways to do this. You can do:

mysql> SELECT VERSION();

or

mysql> SELECT @@version;

or

mysql> STATUS;
+1
source

Source: https://habr.com/ru/post/1779692/


All Articles