Thursday, February 15, 2007

Eclipse, Php Ide and Gentoo

As I said yesterday, I successfully installed eclipse and phpide in my Gentoo box. I had also set up the link to mysql socket, as I had explained in my previous post.

However, as soon as I tried to run a php script that uses mysql functions I got this error:

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/bettini/workspaces/php/dbtophp/share/db.php on line 23
could not connect to database


Fortunately, this is a known error in mysql documentation: http://dev.mysql.com/doc/refman/5.0/en/old-client.html.

In fact, I just did what that page says, i.e., reset the password to the "old" style:

mysql> SET PASSWORD FOR 'some user'@localhost = OLD_PASSWORD('your password');

and the error went away.

Probably this was due to the fact that mysql is version 5.0, but the php engine that comes with phpide (and that I use for running and debugging scripts from within Eclipse) still uses the old mysql functions for connecting to the database.

2 comments:

Hua said...

If you are not familiar with php functions,and want to find php functions contains some words.for example,you want to find php functions contains 'url',try this site:http://www.javatag.com/fjavatag.html

clod said...

Codelobster works better for me.