Question

I have been provided access to a sub domain of an organization's website to upload some content. I want to check the version of MySQL they are using as I need to use MySQLi. How do I do that?

Was it helpful?

Solution

Assuming the hosting comes with no control panel or phpMyAdmin which would show the version, you could run this query;

SELECT VERSION();

OTHER TIPS

You can do it with the phpinfo function. Just create a PHP file with the following code:

phpinfo();

Using a command client (mysql), the server version of the MySQL server to which you are connected is shown once you are connected. The server version information includes community or enterprise accordingly. Both the version and version_comment variables contain version information for the server to which you are connected. Use the SHOW VARIABLES statement to obtain the information you want,

SHOW VARIABLES LIKE "%version%"

You can also obtain server version information in the mysql client using the SELECT VERSION() statement. MySQL Workbench also shows the server version in the Server Status tab and other clients like SQLyog has Info tab.

Refer: http://dev.mysql.com/doc/refman/5.0/en/installation-version.html

first login MySQL database in command prompt afterwards you type the below sentence MySQL>SHOW VARIABLES LIKE "%version%"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top