MySQL or MariaDB is very popular opensource databases servers. While using these database servers we may need to know the version of the client or server. We can use features according to these version numbers. In this tutorial we will look how to list MySQL and MariaDB database server versions.
mysql –version Command
mysql is a client command used to connect and manage database server. We can use
--version option in order to print the version of the mysql client. If the database service runs in the same system this will also print the server version too.
$ mysql --version
We can use package manager of the system. This can be
dnf. In this case we will use
apt with the
show option .
$ apt show mysql-server
As we can see from line
Version: the version is
In the first connection of the MySQL server some basic information about the server is listed. MySQL server version is one of them. The line starting with
Server version: will show the current version of the MySQL server.
$ sudo mysql -u root -p
MySQL server variables are stored in the
VARIABLES variable. We can use
VARIABLES and fileter for
version information like and SQL statement.
> SHOW VARIABLES LIKE "%version%";
As we can see also following information is provided too.
STATUS MySQL Command
MySQL also provides the
STATUS command which is used to current status of the MySQL server. We can this command to print MySQL server version and other server related information like Connection, Current User, Connection Id etc.
As we can see that following information is provided too
- Connection id
- Current database
- Current user
- Server version
- Protocol version
- Server characterset
- Db characterset
- Client characterset
- Conn. characterset
- UNIX socket
1 thought on “How To Check and Determine MySQL Database Server Version?”
Mysql is the query language of the database which help you to store, create, delete data in the database. the code given is really important for us. This helps you to get the version of your database.