Whether you're troubleshooting an issue, ensuring compatibility with specific software, or simply exploring new features, knowing the MySQL version is an essential step. This tutorial demonstrates how to check MySQL version.
1. 'version' option
If you have access to the command line, you can check the MySQL version using the version
option (or the -V
shortcut):
mysql --version
mysql -V
Output example:
mysql Ver 9.1.0 for Linux on x86_64 (MySQL Community Server - GPL)
2. 'VERSION' function
You can also find the MySQL version by running an SQL query. This method is useful if you're already connected to the database with MySQL client:
SELECT VERSION();
3. 'version' variable
MySQL stores its version in the version
system variable, which you can retrieve using the SQL query:
SHOW VARIABLES LIKE 'version';
Leave a Comment
Cancel reply