$db = mysql_connect('mysql', 'database.domain.tld', 'password'); mysql_select_db('database_domain_tld', $db); // SQL, ... mysql_close($db);