开发者

How can I learn MySql version? [duplicate]

This question already has answers here: 开发者_Go百科 Closed 12 years ago.

Possible Duplicate:

Which version is my MySQL Server?

As question indicates how can I learn my 'mysql' server's version by using terminal?


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

SELECT VERSION();

For example you could use this:

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

The result will look something like this:

VERSION()
5.1.41-community


The STATUS command displays the version as well as version comment information. For example:

mysql> STATUS;


Open up a terminal and type in mysql. You should see something like this:

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 works too 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


There are a few ways to do that. You can do:

mysql> SELECT VERSION();

or

mysql> SELECT @@version;

or

mysql> STATUS;


If you have access to the terminal, you can check using:

mysql -V
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜