and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
My host recently upgraded me from MySQL 4.1 to 5. I have been using the mysql_connect command to connect from PHP but it has now been depreciated. Though there is online documentation for this command in mysql terms, I cannot find a PHP/MySQL solution.
This is my code:
<?php
$user="my_username";
$host="localhost";
$password="my_password";
$database ="my_database";
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to the database.");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
?>
Can anyone tell me how to turn this into a mysql_real_connect script which works with MySQL 5? I will post a jar of <a href="http://www.roystonpickles.co.uk">my finest chutney</a> to anyone who cracks this. Many thanks, I'm going spare.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Client does not support authentication protocol requested
by server; consider upgrading MySQL client
have a read of http://dev.mysql.com/doc/refman/5.0/en/old-client.html
If your provider is installing and maintaining php (not a do-it-yourself root server) also send a mail with the problem description and this link to your provider so they can fix it.