I'm aware of the easy way to put up a page that will convey all the PHP info
<?php
phpinfo();
?>
Is there a similar way to find out about the MySQL that is running on a server?
Thanks.
Printable View
I'm aware of the easy way to put up a page that will convey all the PHP info
<?php
phpinfo();
?>
Is there a similar way to find out about the MySQL that is running on a server?
Thanks.
its in there
under mysql look for "Client API version" and you have it.
cheers
Lorenw
perfect, thanks.
or run this query:Code:select version() as v
Thanks. I'm trying this code but it doesn't return anything. What am I doing wrong?
$query = 'SELECT version() as v';
$result = mysql_query($query);
echo $result['v'];
it should be like this:
PHP Code:$query = 'SELECT version() as v';
$result = mysql_query($query);
$rows = mysql_fetch_array($result);
echo $rows['v'];
OK, great, thanks! But this brings up something new. When I use the first method described above, that is look under mysql in the phpinfo(); results, it says mysql > Client API version > 3.23.56. But when I run this query it says 5.0.32-Debian_7etch1. So I'm confused. Is the mysql version I'm using 3.23 or 5.0? Thanks for any insight.
I just ran r937's script and it returned 5.0.18-nt (running vista) and phpmyadmin also has version 5.0.18-nt
phpinfo() tells me it is 5.0.22
I dont remeber which version I installed and "manual.chm" says:
This is the MySQL Reference Manual. It documents MySQL 5.0 up through 5.0.16.
Document generated on: 2005-11-23
I'm not sure what I am running.
lorenw
In my version of phpMyAdmin (2.10.1) there are two related items on the mainpage:
On the left under localhost it says:
Server version: 5.0.32-Debian_7etch1
On the right under phpMyAdmin - 2.10.1 it says:
MySQL client version: 3.23.49
So it appears that when I run r937's script it returns the server version, when I look under the phpinfo() it shows the client version.
Can someone confirm and maybe give me some information on the difference between the Server version and the Client version or point me in a direction to learn more? Thanks!
the server version is the version of mysql you are running
any other version is the version of whatever else it is -- the odbc driver, the client software, the php library, whatever