Jump to content


Photo

MySQL connection error


  • Please log in to reply
1 reply to this topic

#1 acer88

acer88
  • New Members
  • Pip
  • Newbie
  • 3 posts
  • LocationNEw York

Posted 02 September 2006 - 07:43 PM

I am just starting out learning PHP and have been trying to connect to a MYSQL DB as a tutorial.

I get this error:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Top Systems\Top PHP Studio\project\index~tps~~tps~.php on line 5


and this is my code:

<?

$db = "gene";

$link  =  mysql_connect( "localhost", "root", "gene"  );
if ( ! $link )
  die("Couldn't Connect to mysql" );
 
  mysql_select_db( $db)
    or die ("Couldn't open $db: ".mysql_error() )
   


?>


I have MYSQl 5 installed and PHP4 running.

What am I ding wrong here?? thanks from a newbie

#2 bobber205

bobber205
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 02 September 2006 - 07:58 PM

Trying addign a ":" after localhost and put a port, maybe 80 or 8889.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users