MariaDB/MySQL : How to get version information
Putting this here for my own future reference. Recently I need to move some databases to a new MariaDB server and part of the migration process requires me to find out the MariaDB version and the OpenSSL version used by MariaDB.
Below are two ways to find out the MariaDB version from console(terminal).
The first method allows us to see the rest of the MariaDB components version.
$ mysql -u root -p
MariaDB [(none)]> SHOW VARIABLES LIKE '%version%';
+---------------------------------+------------------------------------------+
| Variable_name | Value |
+---------------------------------+------------------------------------------+
| innodb_version | 10.3.15 |
| protocol_version | 10 |
| slave_type_conversions | |
| system_versioning_alter_history | ERROR |
| system_versioning_asof | DEFAULT |
| version | 10.3.15-MariaDB-1:10.3.15+maria~bionic |
| version_comment | mariadb.org binary distribution |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
| version_malloc_library | system |
| version_source_revision | 07aef9f7eb936de2b277f8ae209a1fd72510c011 |
| version_ssl_library | OpenSSL 1.1.1 11 Sep 2018 |
| wsrep_patch_version | wsrep_25.24 |
+---------------------------------+------------------------------------------+
13 rows in set (0.001 sec)
If you only want to know the MariaDB version and not the rest of the, then use this method:
$mysql -V
mysql Ver 15.1 Distrib 10.3.15-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
See also : How to enable MariaDB/MySQL logs ?
By Adam Ng(黃武俊)
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+62.4k Golang : Convert HTTP Response body to string
+6.8k Golang : Find the shortest line of text example
+18.1k Golang : Aligning strings to right, left and center with fill example
+5.7k Facebook : How to force facebook to scrape latest URL link data?
+20.3k Golang : Read directory content with os.Open
+13.2k Golang : Get constant name from value
+8.8k Golang : Serving HTTP and Websocket from different ports in a program example
+13.6k Golang : How to check if a file is hidden?
+4.6k Golang : A program that contain another program and executes it during run-time
+5.9k PHP : How to handle URI or URL with non-ASCII characters such as Chinese/Japanese/Korean(CJK) ?
+32.8k Delete a directory in Go
+19.5k Golang : Count JSON objects and convert to slice/array