In this post, we explain how to check the MySQL version on your Windows VPS and Linux VPS operating systems.
Checking the version of MySQL on a server is quite straightforward. To do so, connect to the server via SSH as the root user.
To check the MySQL version if your server has the Plesk control panel installed, simply run the following command to access the MySQL server:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
or:
# plesk db
Once connected, run:
SHOW VARIABLES LIKE "%version%";
To check the MySQL version if the server does not have the Plesk control panel installed, simply run the following command to access the MySQL server:
# mysql -u[usuario] -p[contraseña]
Once connected, run one of the following queries (either should work):
SHOW VARIABLES LIKE "%version%";
SELECT version();
Or:
SELECT @@version;
There are several ways to view the MySQL version on a Windows server, depending on the tools you use.
- If you use MySQL Administrator, go to the “Server Information” section. The version will appear in the right pane alongside information specific to the MySQL server.
- If you need to use the command line, you can view the version using the queries below. To access the MySQL server: mysql -u[usuario] -p[contraseña]
Once connected, run one of the following queries (either should work):
SHOW VARIABLES LIKE "%version%";
SELECT version();
Or:
SELECT @@version;
Using phpMyAdmin
You can view the version in phpMyAdmin by clicking the “Home” icon, which opens a panel with the following information: