Jump to content

Archived

This topic is now archived and is closed to further replies.

Lassie

Error: message

Recommended Posts

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.
?>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.