If you are the one controlling the MySQL server, do one of the following: 1. Shorten the Password Column of the mysql.User table 2. Change your password to use the old passwords (you may use SET password=OLD_PASSWORD('your_password'); 3. Put the option --OLD-PASSWORDS in your options file 4. Update the User table using the OLD_PASSWORD() function [for example UPDATE mysql.User SET password=OLD_PASSWORD('your_password') WHERE User='your_username' AND Host='your_host']
Just do one of the above and your problem will be solved until PHP releases a version that supports the new authentication protocol used by 4.1 Also, reading the manual will give you more hints. Thanks Emery ----- Original Message ----- From: "ads mysql" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 29, 2003 15:42 Subject: Not able to connect to mysql by mysql_connect() > Hi, > I am trying to connect mysql through .php script. > > Following is the php code. > > ############### > MYSQL_CONNECT("localhost", "xxxxx", "xxxxxxx" ) OR DIE("Unable to connect to database"); > @mysql_select_db("xxxxxxx") or die("Unable to select database"); > ################### > > I get following warning : > > > Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /usr/local/apache2/htdocs/Display_squiddata.php on line 99 > Unable to connect to database. > > I then tried mysql_real_connec() as per documentation as follows : > > ########## > > MYSQL mysql;mysql_init(&mysql);mysql_options(&mysql,MYSQL_OPT_COMPRESS,0);mysql_op tions(&mysql,MYSQL_READ_DEFAULT_GROUP,"odbc");if (!mysql_real_connect(&mysql,"host","user","passwd","database",0,NULL,0)){ fprintf(stderr, "Failed to connect to database: Error: %s\n", mysql_error(&mysql));} > > The above requests the client to use the > > ########## > > > > 1) I want to use mysql_connect() to connect to database whcih I am using all these days. > > 2) If there is any problem due to new version of mysql. Please guide how to use function mysql_real_connect(). Please guide me to URL which will give values for using mysql_real_function. > > > > I am have installed mysql as follows : > > MySQL-client-4.1.1-0.i386.rpm > MySQL-server-4.1.1-1.i386.rpm > > Help appreciated. > > > > > > > > > I don't know what should be values > > > > > > > > > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Photos - Get your photo on the big screen in Times Square -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]