Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.