Connection String Examples for MySQL
Posted by Paul Woodland (Import) on 02 December 2006 04:35 AM
|
|
These examples use "sql05" as the server address. Some customers may be on a different server, and have a different address to replace this with. Our control panel will show you what the server address is for your specific database.
Connecting in .Net using MySQL Connector/Net Dim Conn as New MySql.Data.MySqlClient.MySqlConnection("Server=sql05;Database=DATABASENAME;Uid=USERNAME;Pwd=PASSWORD;")
This code will is the equivalent for C#: MySql.Data.MySqlClient.MySqlConnection conn = new MySql.Data.MySqlClient.MySqlConnection("Server=sql05;Database=DATABASENAME;Uid=USERNAME;Pwd=PASSWORD;")
DRIVER={MySQL ODBC 8.0 Unicode Driver};SERVER=sql05;DATABASE=DATABASENAME;USER=USERNAME;PASSWORD=PASSWORD;OPTION=3
DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=sql05;DATABASE=DATABASENAME;USER=USERNAME;PASSWORD=PASSWORD;OPTION=3
| |
|