If you are in MySQL prompt and want to know which version of the database you are using, you can make use of below queries,
mysql> select version();
+-------------------------+
| version() |
+-------------------------+
| 8.0.28-0ubuntu0.20.04.3 |
+-------------------------+
1 row in set (0.01 sec)

You can also find the details by looking at the variable name version
mysql> show variables like 'version';
+---------------+-------------------------+
| Variable_name | Value |
+---------------+-------------------------+
| version | 8.0.28-0ubuntu0.20.04.3 |
+---------------+-------------------------+
1 row in set (0.01 sec)
One other way is to quit and come out of mysql prompt and once you login you will see the version details,
mysql> quit
Bye
root@b2391b608026:/# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.28-0ubuntu0.20.04.3 (Ubuntu)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
mysql>
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!