Home > Database > Mysql Tutorial > body text

What version of MySQL do I have?

WBOY
Release: 2023-08-26 22:45:15
forward
912 people have browsed it

我的 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();
Copy after login

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';
Copy after login

Let us understand these two syntaxes one by one.

Using version()

mysql> select version();
Copy after login

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)
Copy after login

The second method is as follows

mysql> SHOW VARIABLES WHERE Variable_name = 'version';
Copy after login

The following is Output showing version

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

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template