MySQL Connection Examples: 

Note: Make sure your web hosting provider does not block outgoing MySQL requests.
In general this is done by blocking port "3306" or just by blocking any outgoing 
request from your web site to outside servers.

Note: The name of the MySQL driver in the following examples is "mysql". 
The name of the driver may be deferent depending on your hosting provider's settings.
Ask your hosting provider for the correct name of the MySQL driver.


*********ASP.NET**************

Imports Microsoft.Data.Odbc;
string MyConString = "DRIVER={mysql};" +
"SERVER=;" +
"PORT=;" +
"DATABASE=;" +
"UID=;" +
"PASSWORD=;" +
"OPTION=3";

OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();

*******************************



********PHP********************

$db = mysql_connect(":", "", ";
mysql_select_db("", $this->conn);

*******************************


********ASP********************

conString = "Driver={mysql};server=;port=;database=;uid=;pwd=;"
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open conString 

*******************************


********PERL*******************

my $dbh = DBI->connect( "DBI:mysql:::","", "", { PrintError => 0 } ) || die $DBI::errstr;
my $sth = $dbh->prepare($sql_string);
$sth->execute();
@result_array = $sth->fetchrow_array();

*******************************