How To Find MySQL Version in Linux using the CLI

To find the version of MySQL installed on a Linux system using the command line, you can use the following command:

$ mysql --version

This command will display the version of MySQL that is currently installed on the system, along with some other information, such as the protocol version and the default socket.

For example, the output of the mysql --version command might look something like this:

mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using EditLine wrapper

You can also find the MySQL version by logging into the MySQL shell and running the following command:

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.7.27 MySQL Community Server (GPL)

mysql>

In this case, the version information is displayed in the output of the mysql command after you have logged in to the MySQL shell.

Leave a Comment