Jump to content


Photo

Error: message


  • Please log in to reply
2 replies to this topic

#1 Lassie

Lassie
  • Members
  • PipPipPip
  • Advanced Member
  • 394 posts

Posted 13 October 2006 - 08:31 AM

I have just upgraded mysql from 4.0 to 4.1
I now get the following when trying to connect.
Client does not support authentication protocol requested by server;consider upgrading mysql client...
Can anyone trow light on this please.

My connect coding is

<?php # Script - mysql_connect.php
// This file contains the database access information.
// This file also establishes a connection to MySQL and selects the database.
// This file also defines the escape_data() function.
// Set the database access information as constants.
DEFINE ('DB_USER', 'Mike');
DEFINE ('DB_PASSWORD', 'hawkesley');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'Reg_user');
// Make the connection.
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
// Select the database.
@mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
// Create a function for escaping the data.
function escape_data ($data) {
// Address Magic Quotes.
if (ini_get('magic_quotes_gpc')) {
$data = stripslashes($data);
}
// Check for mysql_real_escape_string() support.
if (function_exists('mysql_real_escape_string')) {
global $dbc; // Need the connection.
$data = mysql_real_escape_string (trim($data), $dbc);
} else {
$data = mysql_escape_string (trim($data));
}
// Return the escaped value.
return $data;
} // End of function.
?>



#2 mjlogan

mjlogan
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 13 October 2006 - 08:39 AM

http://www.digitalpeer.com/id/mysql

#3 Lassie

Lassie
  • Members
  • PipPipPip
  • Advanced Member
  • 394 posts

Posted 13 October 2006 - 11:29 AM

Thanks very much.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users