access_time 4 months ago languageEnglish
more_vert

Check MySQL Version

visibility 18 comment 0

Checking MySQL version can be done easily via mysql CLI or using SQL.

mysql CLI

$ mysql -V
mysql  Ver 14.14 Distrib 5.7.32, for Linux (x86_64) using  EditLine wrapper

SQL

We can either get it from database server variables or using version() function.

mysql> show variables LIKE 'version';
+---------------+-------------------------+
| Variable_name | Value                   |
+---------------+-------------------------+
| version       | 5.7.32-0ubuntu0.18.04.1 |
+---------------+-------------------------+
1 row in set (0.00 sec)
mysql> SELECT version();
+-------------------------+
| version()               |
+-------------------------+
| 5.7.32-0ubuntu0.18.04.1 |
+-------------------------+
1 row in set (0.00 sec)
copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn or Twitter.

Want to contribute on Kontext to help others?

Learn more

More from Kontext