You should always use mysql.hosting-advantage.com as the database server
The following are variables you'll need to replace: DBNAME DBUSERNAME DBPASSWORD
Sample Connection (Perl/CGI): #!/usr/bin/perl use DBI;
$database = "DBNAME"; $hostname = "mysql.hosting-advantage.com"; $port = "3306"; $username = "DBUSERNAME"; $password = 'DBPASSWORD';
$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
$dbh = DBI->connect($dsn, $username, $password) or die("Could not connect!");
$sql = "SELECT * FROM mytable";
$sth = $dbh->prepare($sql); $sth->execute;
while(($column1, $column2) = $sth->fetchrow_array) { print "C1 = $column1, C2 = $column2\n"; }
$dbh->disconnect;
|