- Access to the command line/terminal window
- Some operations require sudo or root privileges
- MySQL or MySQL fork installed (forks: MariaDB, Percona Server )
Check MySQL Version with V Command
The easiest way to find the MySQL version is with the command:
mysql –V is not OS specific. This command works on Windows, OS X, and Linux distributions including Ubuntu.
How to Find Version Number with mysql Command
The MySQL command-line client is a simple SQL shell with input editing capabilities. You need to have administrative privileges or use the
sudo command to gain access.
To access your MySQL client, use the command:
MySQL version data is available automatically once the MySQL client loads.
SHOW VARIABLES LIKE Statement
Now that you have accessed the MySQL client shell, statements can provide detailed information about your MySQL installation. Keep in mind that all text commands within the MySQL client must end with a semicolon “;”
Enter the following command:
SHOW VARIABLES LIKE ‘%version%’;
SELECT VERSION Statement
It’s possible to obtain the version from within the MYSQL client by typing the
SELECT VERSION() statement:
STATUS command displays the version as well as version comment information:
The output includes uptime (how long the MySQL server has been running), threads (the number of active threads), and other useful information.