To find the version of MySQL that is installed on your Linux system using the command line interface (CLI), you can use the mysql
command with the --version
option.
For example, you can use the following command:
mysql --version
This will display the version of MySQL that is installed on your system.
Alternatively, you can also use the mysqld
command with the --version
option to display the version of the MySQL server.
For example:
mysqld --version
You can also use the SELECT version();
SQL query to display the version of MySQL that is running on the server. To do this, you will need to connect to the MySQL server using the mysql
command and then run the query.
For example:
mysql -u username -p
Enter the password for the user when prompted, and then run the SELECT version();
query:
mysql> SELECT version();
This will display the version of MySQL that is running on the server.