Connection Strings For MySQL

If needed, create a DSN (DataSource) by logging into the Control Center at
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):

"Driver={MySQL ODBC 3.51 Driver};;UID=user;PWD=pass;DATABASE=mydb;network=dbmssocn">


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

Perl (DSNless):

$dbh = DBI->connect('','user','pass');

PHP (DSNless):

$db = mysql_connect("", "user", "pass")


MyConn.Open "dsn"

ASP (DSNless):

"Driver={MySQL ODBC 3.51 Driver};" & _
";" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydatabase;" & _
"Uid=user;" & _

** Where 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