How to view the version of MySQL database

How do I check the MySQL database version
A,
One sentence summary:
SQL> select version();
Command line: mysql-v or mysql-version
 
 
MySQL> check the MySQL database version
From or reference: three ways to view the MySQL database version of
https://www.cnblogs.com/kzwrcom/p/6014544.html
1. Use the -v parameter
The first thing that comes to mind is certainly a parameter command to look for the version number, with an argument of -v (capital letters) or –version
Usage:
D:\xampp\mysql\bin> mysql -V
or
D:\xampp\mysql\bin> mysql –version
 
2. Use??parameter
This actually has three similar parameters
–help
-i (capital I)
-?
All three are parameters for viewing help information
Usage:
D:\xampp\mysql\bin> mysql -?
or
D:\xampp\mysql\bin> mysql –help
or
D:\xampp\mysql\bin> mysql -I
 
3, SQL statement to query version information
select version();
There are also other ways to indirectly view MySQL database version information, such as using status; But these three methods are the most convenient and direct.
 
Reproduced in: https://www.cnblogs.com/Renyi-Fan/p/11064960.html


Read More: