Connection Strings For MySQL

If needed, create a DSN (DataSource) by logging into the Control Center at
https://www.webcontrolcenter.com/domain.aspx
and from the menu item DATABASE clcik on DATASOURCE

Next, use one of the following connection string formats that corresponds to the platform used in the code of the website.

CF5 (DSNless):

connectstring=
"Driver={MySQL ODBC 3.51 Driver};
SERVER=mysql#.webcontrolcenter.com;UID=user;PWD=pass;DATABASE=mydb;network=dbmssocn">

CFMX (DSN):

datasource="DSN" username="user" password="pass"

Perl (DSNless):

$dbh = DBI->connect('dbi:mysql:mydatabase:mysql#.webcontrolcenter.com','user','pass');

PHP (DSNless):

$db = mysql_connect("mysql#.webcontrolcenter.com", "user", "pass")

ASP (DSN):

MyConn.Open "dsn"

ASP (DSNless):

"Driver={MySQL ODBC 3.51 Driver};" & _
"Server=mysql#.webcontrolcenter.com;" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydatabase;" & _
"Uid=user;" & _
"Pwd=pass"

** Where mysql#.webcontrolcenter.com you would need to replace the # with the number of your MySQL server which can be found from the menu item DATABASE select MYSQL and click on MY SQL ADMIN in the Control Center

Add Feedback