Jump to content

Error: message


Lassie

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.