Forum Moderators: travelin cat
Searching in entropy.com, I found everybody complainig about the same thing, some suggestions got me to where I am now.
I'm trying a reinstall, the removal of the previous package was a bit of a mess, but I found out that it was under /usr/bin so to remove I issued:
$rm mysql*
I also got rid of /var/mysql
and a plist file in /etc
as well as any package receit in the library.
I installed the binary distribution from mysql site v4.1.15 for ppc darwin, technically everything went fine untill I tryed to connect using PHP. Could this be a PHP 4 bug?
This is the error I got:
Client does not support authentication protocol requested by server; consider upgrading MySQL client.
I'm able to connect using $mysql -u username -p
I'm able to do everything create BDs, add tables selects, grant flush, change passwords all that good stuff, but not through PHP.
That makes me think PHP is not able to get to MySQL.
At first there was no way to make PHP see the socket, now it sees it but can't authenticate.
This could also be a permissions problem.
Then I found an article in the apple website, instructions that I haven't trye yet for I don't think it's a MySQL problem. But here is the URL in case somebody want's to try.
[developer.apple.com...]
I'm afraid I can't use the OSX default installations of PHP and MySQL. Nasty isn't it?
Please let me know if you can find a solution, I'll keep trying.
Try upgrading your PHP using one of those fine packages you at that entropy site you mentioned. I upgraded to PHP 5 but the PHP 4 install should work too.
[php.net...]
As I stated in the thread that timster is referring to, the libmysqlclient libraries from MySQL have changed between 4.0, 4.1 and 5.0.
In PHP 5 you no longer get the embedded libraries, so you'll have to explicitly compile PHP 5 against MySQL no matter what version of MySQL you are using - even the old 3.5.x. And the in PHP 4 embedded libraries simply won't work with MySQL 5.x. Also, if you re-install MySQL you'll have to make damned sure that the libmysqlclient shared libraries are installed in the same place as before and have the same names - otherwise you are toast. You'll also have to re-start Apache in order for Apache/PHP to pick the new libraries up. Take a look at the Apache/PHP error logs for issues regarding this.
The webpage matiaslanzi is referring to is about how to get MySQL compiled on Mac OS X Client. It's a big question whether Mac OS X Server has the MySQL stuff installed in the same places as the author of the article is using.
And being able to use mysql from the command line, but not from PHP just indicates that your Apache/PHP MySQL combination is toast.
The issues are thus:
- where are the libmysqlclient shared libraries installed
- does PHP use them
- is PHP looking for the libmysqlclient libraries in the correct place
- is PHP 4 using the embedded libraries and have you installed MySQL 5
- has PHP loaded libmysqlclient libraries that are incompatible with the MySQL version you have just installed.