MySQL Forums
Forum List  »  MySQL Administrator

Re: remote access to mysql database
Posted by: Jim Donnell
Date: May 31, 2006 09:02PM

Here's the code I'm using in PHP to connect to the database.

<?
$hostname="someserver";
$username="someusername";
$password="thesecretpassword";
$dbname="test";

$db = mysql_connect($hostname,$username, $password) OR DIE ("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.');</script></html>");
mysql_select_db($dbname, $db);
?>

Jim

Options: ReplyQuote


Subject
Written By
Posted
Re: remote access to mysql database
May 31, 2006 09:02PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.