Your Gateway To Digital Success
Wesbytes Blue Logo

Wesbytes Knowledge Base

Search our articles or browse by category below

How to Check the MySQL version in cPanel

Last modified: July 2, 2022
You are here:
Estimated reading time: < 1 min

How to Check the MySQL version in cPanel

    1. Firstly, login to cPanel.
    2. Next, click Server Information under General Information section on right margin.
    3. Lastly, find MySQL Version under the Item column to know your MySQL version.
    4. 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 SSHFTP or from your cPanel >> File Manager tool.

Was this article helpful?
Dislike 0
Views: 16