Lassie Posted October 13, 2006 Share Posted October 13, 2006 I have just upgraded mysql from 4.0 to 4.1I 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 https://forums.phpfreaks.com/topic/23830-error-message/ Share on other sites More sharing options...
mjlogan Posted October 13, 2006 Share Posted October 13, 2006 http://www.digitalpeer.com/id/mysql Link to comment https://forums.phpfreaks.com/topic/23830-error-message/#findComment-108225 Share on other sites More sharing options...
Lassie Posted October 13, 2006 Author Share Posted October 13, 2006 Thanks very much. Link to comment https://forums.phpfreaks.com/topic/23830-error-message/#findComment-108261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.