Home  >  Article  >  Database  >  What version of MySQL do I have?

What version of MySQL do I have?

WBOY
WBOYforward
2023-08-26 22:45:15865browse

我的 MySQL 是哪个版本?

You can use two methods to find out the version of MySQL. In the first method, you can use version() to find out the MySQL Server version. The first method is as follows

SELECT VERSION();

In the second method, you can use the SHOW VARIABLES command to know the MySQL version. The second method is as follows

SHOW VARIABLES WHERE Variable_name = 'version';

Let us understand these two syntaxes one by one.

Using version()

mysql> select version();

The following is the output showing the current version of MySQL you are using

+-----------+
| version() |
+-----------+
| 8.0.12    |
+-----------+
1 row in set (0.00 sec)

The second method is as follows

mysql> SHOW VARIABLES WHERE Variable_name = 'version';

The following is Output showing version

+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| version       | 8.0.12 |
+---------------+--------+
1 row in set (0.01 sec)

The above is the detailed content of What version of MySQL do I have?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete