How to check MySQL version

In the terminal, we can type mysql -V (uppercase V) to display the current MySQL version installed on the server.

Terminal

$ mysql -V

mysql  Ver 8.0.18 for Linux on x86_64 (MySQL Community Server - GPL)

The above output show MySQL version 8.0.18 is installed on the server.

Server System Variables

Alternatively, we can connect to MySQL and use show variables to display the MySQL server system variables.

Terminal

$ sudo mysql -u root -p

mysql> show variables like "%version%";
+--------------------------+-------------------------------+
| Variable_name            | Value                         |
+--------------------------+-------------------------------+
| immediate_server_version | 999999                        |
| innodb_version           | 8.0.18                        |
| original_server_version  | 999999                        |
| protocol_version         | 10                            |
| slave_type_conversions   |                               |
| tls_version              | TLSv1,TLSv1.1,TLSv1.2,TLSv1.3 |
| version                  | 8.0.18                        |
| version_comment          | MySQL Community Server - GPL  |
| version_compile_machine  | x86_64                        |
| version_compile_os       | Linux                         |
| version_compile_zlib     | 1.2.11                        |
+--------------------------+-------------------------------+
11 rows in set (0.04 sec)

References

No comments yet. Be the first to leave a comment!

Leave a Comment

Your email address will not be published. Required fields are marked *