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_options(&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

Reply via email to