473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

connectivity error in mysql due to authentication protocol

nirmalsingh
218 100+
hi my coding is
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. /* You should never post secure details like IP address, 
  4.    username and password on a public forum
  5.  
  6.    Removed for security
  7.    Banfa
  8.    Admin */
  9. $con = mysql_connect("<IPAddress>","<user>","<password>");//line 10
  10.  
  11. if (!$con)
  12.   {
  13.   die('Could not connect: mes' . mysql_error());
  14.   }
  15.  
  16. mysql_select_db("finance", $con);
  17.  
  18. $result = mysql_query("SELECT * FROM city_master");
  19.  
  20. echo "<table border='1'>
  21. <tr>
  22. <th>Firstname</th>
  23. <th>Lastname</th>
  24. </tr>";
  25. while($row = mysql_fetch_array($result))
  26.   {
  27.   echo "<tr>";
  28.   echo "<td>" . $row['city_code'] . "</td>";
  29.   echo "<td>" . $row['city_name'] . "</td>";
  30.   echo "</tr>";
  31.   }
  32. echo "</table>";
  33. mysql_close($con);
  34. ?> 
  35.  
database details:
----------------------
host: <snipped>
user name: <snipped>
password: <snipped>
database name: <snipped>
table: <snipped>
fields: <snipped>, <snipped>

error occured:
----------------------
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/bcns/public_html/bala/testPHP/New Folder/welcome.php on line 10
Could not connect: mesClient does not support authentication protocol requested by server; consider upgrading MySQL client


i am newbie to php help me
Jan 22 '07 #1
1 1465
ronverdonk
4,258 Expert 4TB
The MySQL standard documentation provides the answer to this. In short:
To solve this problem, you should use one of the following approaches:

Upgrade all client programs to use a 4.1.1 or newer client library.

When connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:
See http://dev.mysql.com/doc/refman/5.1/en/old-client.html for a detailed explanation and solution.

Ronald :cool:
Jan 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ME | last post by:
Just thought I would post a solution (temporary at best, but a solution at least.) for all those using PostNuke who have upgraded MySql to 4.1. I have had problems with PostNuke logging into MySql...
5
by: Martin | last post by:
I don't know if this is a PHP problem or a MySQL problem - hopefully, someone here can give me a clue. I am getting the subject error when I try to connect to MySQL from a PHP page. $conn =...
8
by: Bob Everland | last post by:
I have an application that is ISAPI and the only way to secure it is through NT permissions. I need to have a way to login to windows authentication so that when I get to the ISAPI application no...
1
by: Thomas | last post by:
Hallo. Habe auf einem SeSE 9.1 Server due neue MySQL 4.1.11 und den dazugehörigen client installiert. #: mysql -V mysql Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i686) Soweit so gut der...
1
by: trapeze.jsg | last post by:
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to...
18
by: troywalker | last post by:
I am new to LDAP and Directory Services, and I have a project that requires me to authenticate users against a Sun Java System Directory Server in order to access the application. I have found...
1
by: dipal | last post by:
I m totally new to php and mysql i got the following error connectivity error in mysql due to authentication protocol i have instaled mysql 4.1 and php 4.1 but still i get this error so can...
0
by: umesh049 | last post by:
hi i am getting this error plz help me i made a new listener and new odbc connection which is working almost fine. Hi my problem is almost solve except. SQL> select count(*) from...
6
by: praveenb000 | last post by:
we hosted a website http://vijayawadanalanda.org developed using asp.net and back end MS Accees database. There is some database connectivity problem occurring when saving the information in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.