Home >Database >Mysql Tutorial >What version of MySQL do I have?
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.
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!