How to Check the MySQL version in cPanel
- Firstly, login to cPanel.
- Next, click Server Information under General Information section on right margin.
- Lastly, find MySQL Version under the Item column to know your MySQL version.
- Or you can navigate cPanel >> Databases >> phpMyAdmin to check MySQL version.
Check MySQL version with PHP script
You have to create a new file on your account and place the following code inside it:
<?php
$mysql = mysqli_connect(‘localhost’, ‘USERNAME’, ‘PASSWORD’);
/* Test the MySQL connection */
if (mysqli_connect_errno()) {
printf(“Connection failed: %s\n”, mysqli_connect_error());
exit();
}
/* Print the MySQL server version */
printf(“MySQL server version: %s\n”, mysqli_get_server_info($mysql));
/* Close the MySQL connection */
mysqli_close($mysql);
?>
Do not forget to replace the USERNAME and PASSWORD with your cPanel username and password. Next, open your file in browser and you will see the current MySQL version.
You can generate the file through SSH, FTP or from your cPanel >> File Manager tool.