0

I can use:

extension_loaded('mysql') 

to check if mySQL is installed on the server or not.

also phpinfo() can display a nice phpinfo page.

but how to get which mysql version is installed on server? is there any function like:

which_extension_version('mysql') //output the mysql version? 

just like the PHP_VERSION?

2

3 Answers 3

2

You can get it with:

mysqli_get_server_version(); 
Sign up to request clarification or add additional context in comments.

Comments

1

Use the mysql_get_server_info() after connect with mysql_connect

<?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } printf("MySQL server version: %s\n", mysql_get_server_info()); ?> 

Comments

0

Take a look at: mysql_get_server_info()

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.