LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mysql up-gradation not showing in Php info page (http://www.linuxquestions.org/questions/linux-server-73/mysql-up-gradation-not-showing-in-php-info-page-694291/)

tanveer 01-01-2009 02:10 PM

Mysql up-gradation not showing in Php info page
 
Hi all,
I have a machine, a old one with old mysql-4.1.14-standard for 32bit which is running a monitoring tool like cacti. The mysql was a binary one.
I also have php and apache running; where PHP was compiled with the option --with-mysql=/usr/local/mysql and phpinfo page shows the mysql verison 4.1.14 standard in MySQL section.
So far so good.

Now, I download MySQL 5.1.30 source file and compiled it in /usr/test/mysql. Now after running `make` and `make install` I dumped the databases of previous mysql in the new datadir of new mysql & when I run the new mysql server after stopping the old one its surprisingly working. That is the apache is serving pages which Connects to mysql. But the Phpinfo page is still showing the old mysql version.

Both the new and old mysql are using /tmp/mysql.sock file; is that the issue otherwise as PHP was compiled with the mysql location which is not running how come its connecting to mysql!

I even renamed the /usr/local/mysql folder to other name but still it works.

rylan76 01-05-2009 05:43 AM

Have you tried recompiling PHP?

I suspect that the PHPMyInfo entry might be set at compile time for database version?

tanveer 01-05-2009 06:01 AM

No, I haven't as I know if I recompile with new mysql location then the phpinfo page will show the new mysql version definite.
But what I am asking is right now how come PHP is communicating with new mysql in a different location not compiled with in php.

rylan76 01-06-2009 04:07 AM

I think that might be because the PHP / MySQL communications mechanism uses a standard location. I. e. whatever MySQL version is active works with port 3306 on localhost - so two MySQL versions can exist, one running, and responding to commands from PHP, even while PHP itself "thinks" it is talking to the inactive (not running) one...

tanveer 01-13-2009 08:20 PM

I also think so and most probably the file responsible for this is mysql.sock which default location is /tmp.
And in my case both the old and new versions of mysql uses that same file as per my my.cnf settings.
Anyway I finally recompiled the PHP with new mysql compiled location and now its showing the latest mysql client API version as we all assumed.


All times are GMT -5. The time now is 02:31 AM.