MySQL Version might have something to do with supported features, syntax, etc. So it’s good to be aware of which version your service is currently running on. This post will demonstrate various ways to see MySQL Version.
1. From the command line
From the command line, run this command:
Or this command:
An example for the result:
mysqld Ver 5.7.27-0ubuntu0.18.04.1 for Linux on x86_64 ((Ubuntu))
2. From a command client
When you first connected to your database via the command client, the server information is shown on the screen:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.0.27-standard MySQL Community Edition - Standard (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
3. From a GUI MySQL Client
When connected to the database, you can check the MySQL Version by executing this query:
SHOW VARIABLES LIKE "%version%";
It will show you all the relevant system variables, somewhat like this:
|version_comment||MySQL Community Server - GPL|
You can see MySQL Version from the result as well as some additional information including protocol_version, innodb_version, tls_version, etc.
TablePlus GUI tool has all server information shown on the status bar, you can click on it and see more details.
Need a good GUI tool for databases? TablePlus provides a native client that allows you to access and manage Oracle, MySQL, SQL Server, PostgreSQL, and many other databases simultaneously using an intuitive and powerful graphical interface.
Not on Mac? Download TablePlus for Windows.
On Linux? Download TablePlus for Linux
Need a quick edit on the go? Download TablePlus for iOS