Codice PHP:
$link mysql_connect('localhost','root','') or die(mysql_error()); 
mysql_select_db('mydata',$link) or die(mysql_error());