×

Different methods of Checking MySQL Version in Linux


MySql is a relational database management system that permits users to organize data in the database. Knowing which MySQL version is running on your server may be useful in some cases due to certain differences between MySQL versions. If you’re installing an application that requires a specific MySQL version, for example, you’ll need to know what version of MySQL your MySQL server is before you start.

Here at LinuxAPT, we shall look into the different ways to check the MySQL version in Linux.


How to check the MYSQL version on Linux ?

1. Using the command line, you can check the MYSQL version 

Run the following command into your terminal:

$ mysql -V

To ascertain the server version, run the binary with the –version or -V lines:

$ sudo mysql --version

Note: Before quitting, the command above will indicate the version of MySQL installed.

To determine the installed MySQL version, use the following command with the mysqladmin program:

$ mysqladmin -V


2. Using the MYSQL shell, you can check the MYSQL version

The MySQL utility command client is used to find out what version of MySQL your operating system has installed. On the MySQL shell, use the following command to connect to the MySQL server:

$ sudo mysql

Once the server has been connected to the MySQL shell, the MySQL version will be displayed on the screen.

The status command displays the current status of the server, as well as the MySQL version.

To use the status command, run the following command:

$ mysql>status

Use the query version variables as suggested to acquire more information about the MySQL installed version and all of its related components:

mysql> SHOW VARIABLES LIKE "%version%";


3. Using MySQL Workbench, you can check the version of MySQL.

Another way to check the version of MySQL installed on your machine is to use MySQL Workbench.

  • Connect to the server using MySQL Workbench and then proceed as follows:
  • On the MySQL workbench main menu, select the server.
  • Select "Server Status" from the drop-down menu.
  • Both the server information and the MySQL version will be displayed in the server status.


4. Using PHP, you can check the version of MySQL

If you're on a shared hosting account and don't have access to a command line or a MySQL client like PhpMyAdmin, you can use PHP to find out what MySQL server version you're running.


[Need help in fixing MySQL issues on your Linux system ? We can help you. ]



Conclusion

This article covers the ways to check the MySQL version in Linux. In fact, MySQL (and its drop-in replacement MariaDB) is the most popular open-source relational database management system. There are some important differences between MySQL versions, so knowing which version is running on your server might be important in some situations.


How to Check MySQL Version with V Command ?

The easiest way to find the MySQL version is with the command:

$ mysql -V

The command mysql –V is not OS specific. This command works on Windows, OS X, and Linux distributions including Ubuntu.


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com