【SQLSERVER】】
StandardSecurity
DataSource=myServerAddress;InitialCatalog=myDataBase;UserId=myUsername;Password=myPassword;
StandardSecurityalternativesyntax
Thisconnectionstringproducesthesameresultasthepreviousone.Thereasontoincludeitistopointoutthatsomeconnectionstringkeywordshavemanyequivalents.
Server=myServerAddress;Database=myDataBase;UserID=myUsername;Password=myPassword;Trusted_Connection=False;
TrustedConnection
DataSource=myServerAddress;InitialCatalog=myDataBase;IntegratedSecurity=SSPI;
TrustedConnectionalternativesyntax
Thisconnectionstringproducethesameresultasthepreviousone.Thereasontoincludeitistopointoutthatsomeconnectionstringkeywordshavemanyequivalents.
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
UseserverName\instanceNameasDataSourcetouseaspecificSQLServerinstance.PleasenotethatthemultipleSQLServerinstancesfeatureisavailableonlyfromSQLServerversion2000andnotinanypreviousversions.
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
TrustedConnectionfromaCEdevice
OftenaWindowsCEdeviceisnotauthenticatedandloggedintoadomain.TouseSSPIortrustedconnection/authenticationfromaCEdevice,usethisconnectionstring.
DataSource=myServerAddress;InitialCatalog=myDataBase;IntegratedSecurity=SSPI;UserID=myDomain\myUsername;Password=myPassword;
NotethatthiswillonlyworkonaCEdevice.ReadmoreaboutconnectingtoSQLServerfromCEdeviceshere
ConnectviaanIPaddress
DataSource=190.190.200.100,1433;NetworkLibrary=DBMSSOCN;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;
Specifyingpacketsize
Server=myServerAddress;Database=myDataBase;UserID=myUsername;Password=myPassword;Trusted_Connection=False;PacketSize=4096;
Bydefault,theMicrosoft.NETFrameworkDataProviderforSQLServersetsthenetworkpacketsizeto8192bytes.Thismighthowevernotbeoptimal,trytosetthisvalueto4096instead.Thedefaultvalueof8192mightcauseerrorsaswell("Failedtoreservecontiguousmemory"),checkthisout
MicrosoftOLEDBProviderforSQLServer
Type:OLEDBProviderUsage:Provider=sqloledbManufacturer:MicrosoftMoreinfoaboutthisprovider?Customizestringexamplevalues?
StandardSecurity
Provider=sqloledb;DataSource=myServerAddress;InitialCatalog=myDataBase;UserId=myUsername;Password=myPassword;
Trustedconnection
Provider=sqloledb;DataSource=myServerAddress;InitialCatalog=myDataBase;IntegratedSecurity=SSPI;
UseserverName\instanceNameasDataSourcetouseaspecificSQLServerinstance.PleasenotethatthemultipleSQLServerinstancesfeatureisavailableonlyfromSQLServerversion2000andnotinanypreviousversions.
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Provider=sqloledb;DataSource=myServerName\theInstanceName;InitialCatalog=myDataBase;IntegratedSecurity=SSPI;
Promptforusernameandpassword
Thisoneisabittricky.Firstsettheconnectionobject'sProviderpropertyto"sqloledb".Thereaftersettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Provider="sqloledb"oConn.Properties("Prompt")=adPromptAlways
DataSource=myServerAddress;InitialCatalog=myDataBase;
ConnectviaanIPaddress
Provider=sqloledb;DataSource=190.190.200.100,1433;NetworkLibrary=DBMSSOCN;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP.ThisishowtouseTCP/IPinsteadofNamedPipes.AttheendoftheDataSourceistheporttouse.1433isthedefaultportforSQLServer.Howtodefinewhichnetworkprotocoltouse
Disableconnectionpooling
Thisoneisusefullwhenrecevingerrors"sp_setapprolewasnotinvokedcorrectly."(7.0)or"Generalnetworkerror.Checkyournetworkdocumentation"(2000)whenconnectingusinganapplicationroleenabledconnection.Applicationpooling(orOLEDBresourcepooling)isonbydefault.Disablingitcanhelponthiserror.
Provider=sqloledb;DataSource=myServerAddress;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;OLEDBServices=-2;
.NETFrameworkDataProviderforOLEDB
Type:.NETFrameworkWrapperClassLibraryUsage:System.Data.OleDb.OleDbConnectionManufacturer:MicrosoftMoreinfoaboutthiswrapperclasslibrary?Customizestringexamplevalues?
BridgingtoOLEDBProviderforSQLServer
ThisisjustoneconnectionstringsampleforthewrappingOleDbConnectionclassthatcallstheunderlyingOLEDBprovider.SeerespectiveOLEDBproviderformoreconnectionstringstousewiththisclass.
Provider=SQLOLEDB;DataSource=myServerAddress;InitialCatalog=myDataBase;UserId=myUsername;Password=myPassword;
MicrosoftSQLServerODBCDriver
Type:ODBCDriverUsage:Driver={SQLServer}Manufacturer:Microsoft
Customizestringexamplevalues?
StandardSecurity
Driver={SQLServer};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Trustedconnection
Driver={SQLServer};Server=myServerAddress;Database=myDataBase;Trusted_Connection=Yes;
Promptforusernameandpassword
Thisoneisabittricky.Firstyouneedtosettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Properties("Prompt")=adPromptAlways
Driver={SQLServer};Server=myServerAddress;Database=myDataBase;
SQLServerNativeClient10.0OLEDBProvider
Type:OLEDBProviderUsage:Provider=SQLNCLI10Manufacturer:MicrosoftMoreinfoaboutthisprovider?Customizestringexamplevalues?
Standardsecurity
NotethattheSQLServerNativeClientOLEDBProviderdoesnotsupportSQLServer7.0.
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Trustedconnection
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
Equivalentkey-valuepair:"IntegratedSecurity=SSPI"equals"Trusted_Connection=yes"
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Provider=SQLNCLI10;Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes;
Promptforusernameandpassword
Thisoneisabittricky.Firstyouneedtosettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Properties("Prompt")=adPromptAlways
oConn.Open"Provider=SQLNCLI10;Server=myServerAddress;DataBase=myDataBase;
Encryptdatasentovernetwork
Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes;
SQLNativeClient9.0OLEDBprovider
Type:OLEDBProviderUsage:Provider=SQLNCLIManufacturer:MicrosoftMoreinfoaboutthisprovider?Customizestringexamplevalues?
Standardsecurity
NotethattheSQLServerNativeClientOLEDBProviderdoesnotsupportSQLServer7.0.
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Trustedconnection
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
Equivalentkey-valuepair:"IntegratedSecurity=SSPI"equals"Trusted_Connection=yes"
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Provider=SQLNCLI;Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes;
Promptforusernameandpassword
Thisoneisabittricky.Firstyouneedtosettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Properties("Prompt")=adPromptAlways
oConn.Open"Provider=SQLNCLI;Server=myServerAddress;DataBase=myDataBase;
Encryptdatasentovernetwork
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes;
SQLServerNativeClient10.0ODBCDriver
Type:ODBCDriverUsage:Driver={SQLServerNativeClient10.0}Manufacturer:MicrosoftMoreinfoaboutthisdriver?Customizestringexamplevalues?
Standardsecurity
Driver={SQLServerNativeClient10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
TrustedConnection
Driver={SQLServerNativeClient10.0};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
Equivalentkey-valuepair:"IntegratedSecurity=SSPI"equals"Trusted_Connection=yes"
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Driver={SQLServerNativeClient10.0};Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes;
Promptforusernameandpassword
Thisoneisabittricky.Firstyouneedtosettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Properties("Prompt")=adPromptAlways
Driver={SQLServerNativeClient10.0};Server=myServerAddress;Database=myDataBase;
Encryptdatasentovernetwork
Driver={SQLServerNativeClient10.0};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes;
SQLNativeClient9.0ODBCDriver
Type:ODBCDriverUsage:Driver={SQLNativeClient}Manufacturer:MicrosoftMoreinfoaboutthisdriver?Customizestringexamplevalues?
Standardsecurity
Driver={SQLNativeClient};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
TrustedConnection
Driver={SQLNativeClient};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;
Equivalentkey-valuepair:"IntegratedSecurity=SSPI"equals"Trusted_Connection=yes"
ConnectingtoanSQLServerinstance
ThesyntaxofspecifyingtheserverinstanceinthevalueoftheserverkeyisthesameforallconnectionstringsforSQLServer.
Driver={SQLNativeClient};Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=yes;
Promptforusernameandpassword
Thisoneisabittricky.Firstyouneedtosettheconnectionobject'sPromptpropertytoadPromptAlways.Thenusetheconnectionstringtoconnecttothedatabase.
oConn.Properties("Prompt")=adPromptAlways
Driver={SQLNativeClient};Server=myServerAddress;Database=myDataBase;
Encryptdatasentovernetwork
Driver={SQLNativeClient};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Encrypt=yes;
.NETFrameworkDataProviderforODBC
Type:.NETFrameworkWrapperClassLibraryUsage:System.Data.Odbc.OdbcConnectionManufacturer:MicrosoftMoreinfoaboutthiswrapperclasslibrary?Customizestringexamplevalues?
BridgingtoSQLNativeClient10.0ODBCDriver
ThisisjustoneconnectionstringsampleforthewrappingOdbcConnectionclassthatcallstheunderlyingODBCDriver.SeerespectiveODBCdriverformoreconnectionstringstousewiththisclass.
Driver={SQLServerNativeClient10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SQLXML3.0OLEDBProvider
Type:OLEDBProviderUsage:Provider=SQLXMLOLEDB.3.0;DataProvider=sqloledbManufacturer:MicrosoftMoreinfoaboutthisprovider?Customizestringexamplevalues?
UsingSQLServerOleDb
TheSQLXMLversion3.0restrictsthedataprovidertoSQLOLEDBonly.
Provider=SQLXMLOLEDB.3.0;DataProvider=SQLOLEDB;DataSource=myServerAddress;InitialCatalog=myDataBase;UserId=myUsername;Password=myPassword;
MSDataShape
Type:DataShapingCOMcomponentUsage:Provider=MSDataShape;DataProvider=providernameManufacturer:MicrosoftMoreinfoaboutthiswrapperCOMcomponent?
Customizestringexamplevalues?
MSDataShape
Provider=MSDataShape;DataProvider=SQLOLEDB;DataSource=myServerAddress;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;
【MYSQL】
Standard
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Defaultportis3306.
Specifyingport
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
DownloadthedriveratMySQLDeveloperZone
Namedpipes
Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Itistheportvalueof-1thattellsthedrivertousenamedpipesnetworkprotocol.ThisisavailableonWindowsonly.ThevalueisignoredifUnixsocketisused.
Multipleservers
Usethistoconnecttoaserverinareplicatedserverconfigurationwithoutconcernonwhichservertouse.
Server=serverAddress1&;serverAddress2&;etc..;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Usingencryption
ThisoneactivatesSSLencryptionforalldatasentbetweentheclientandserver.Theserverneedstohaveacertificateinstalled.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encryption=true;
ThisoptionisavailablefromConnector/NETversion5.0.3.Inearlierversions,thisoptionhasnoeffect.
Usingencryption,alternative
Somereportedproblemswiththeaboveone.Tryreplacingthekey"Encryption"with"Encrypt"instead.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;
Specifyingdefaultcommandtimeout
Usethisonetospecifyadefaultcommandtimeoutfortheconnection.Pleasenotethatthepropertyintheconnectionstringdoesnotsupercedetheindividualcommandtimeoutpropertyonanindividualcommandobject.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;defaultcommandtimeout=20;
ThisoptionisavailablefromConnector/NETversion5.1.4.
Specifyingconnectionattempttimeout
Usethisonetospecifythelengthinsecondstowaitforaserverconnectionbeforeterminatingtheattemptandreceiveanerror.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;ConnectionTimeout=5;
Inactivatingpreparedstatements
Usethisonetoinstructtheprovidertoignoreanycommandpreparestatementsandpreventcorruptionissueswithserversidepreparedstatements.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;IgnorePrepare=true;
TheoptionwasaddedinConnector/NETversion5.0.3andConnector/NETversion1.0.9.
Specifyingport
Usethisonetospecifywhatporttousefortheconnection.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Port=3306;
Theport3306isthedefaultMySqlport.
ThevalueisignoredifUnixsocketisused.
Specifyingnetworkprotocol
Usethisonetospecifywhichnetworkprotocoltousefortheconnection.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Protocol=socket;
"socket"isthedefaultvalueusedifthekeyisn'tspecified.Value"tcp"isanequivalentfor"socket".
Use"pipe"touseanamedpipesconnection,"unix"foraUnixsocketconnectionand"memory"touseMySQLsharedmemory.
Specifyingcharacterset
Usethisonetospecifywhichcharactersettousetoencodequeriessenttotheserver.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;CharSet=UTF8;
Notethatresultsetsstillarereturnedinthecharactersetofthedatareturned.
Specifyingsharedmemoryname
Usethisonetospecifythesharedmemoryobjectnameusedforthecommunication.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;SharedMemoryName=MYSQL;
Thisoneisapplicableonlywhentheconnectionprotocolvalueissetto"memory".
eInfoDesigns.dbProvider
Type:.NETFrameworkClassLibraryUsage:eInfoDesigns.dbProvider.MySqlClient.MySqlConnectionManufacturer:eInfoDesignsMoreinfoaboutthisclasslibrary?Customizestringexamplevalues?
Standard
DataSource=myServerAddress;Database=myDataBase;UserID=myUsername;Password=myPassword;CommandLogging=false;
SevenObjectsMySqlClient
Type:Usage:Manufacturer:SevenObjectsMoreinfoaboutthisclasslibrary?Customizestringexamplevalues?.NETFrameworkClassLibrary
Standard
Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;
dotConnectforMySQL(formerMyDirect.NETandCoreLabsMySQLDirect.NET)
Type:.NETFrameworkClassLibraryUsage:Devart.Data.MySql.MySqlConnectionManufacturer:DevartMoreinfoaboutthisclasslibrary?Customizestringexamplevalues?
Standard
UserID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase;Direct=true;Protocol=TCP;Compress=false;Pooling=true;MinPoolSize=0;MaxPoolSize=100;ConnectionLifetime=0;
ReadmoreatDevart(formerCoreLab)
MySQLDriverCS
Type:.NETFrameworkClassLibraryUsage:MySQLDriverCS.MySQLConnectionManufacturer:MySQLDriverCSprojectteamMoreinfoaboutthisclasslibrary?Customizestringexamplevalues?
Standard
Location=myServerAddress;DataSource=myDataBase;UserID=myUsername;Password=myPassword;Port=3306;ExtendedProperties="""";
Thisisafreesimple.NETcompliantMySQLdriver.ProjectspaceatSourceForge
MySQLOLEDB
Type:OLEDBProviderUsage:Provider=MySQLProvManufacturer:MySQLMoreinfoaboutthisprovider?Customizestringexamplevalues?
Standard
Provider=MySQLProv;DataSource=mydb;UserId=myUsername;Password=myPassword;
.NETFrameworkDataProviderforOLEDB
Type:.NETFrameworkWrapperClassLibraryUsage:System.Data.OleDb.OleDbConnectionManufacturer:MicrosoftMoreinfoaboutthiswrapperclasslibrary?Customizestringexamplevalues?
BridgingtoMySQLOLEDB
ThisisjustoneconnectionstringsampleforthewrappingOleDbConnectionclassthatcallstheunderlyingOLEDBprovider.SeerespectiveOLEDBproviderformoreconnectionstringstousewiththisclass.
Provider=MySQLProv;DataSource=mydb;UserId=myUsername;Password=myPassword;
MyODBC2.50
Type:ODBCDriverUsage:Driver={mySQL}Manufacturer:MySQLMoreinfoaboutthisdriver?Customizestringexamplevalues?
Localdatabase
Driver={mySQL};Server=localhost;Option=16834;Database=myDataBase;
Remotedatabase
Driver={mySQL};Server=myServerAddress;Option=131072;Stmt=;Database=myDataBase;User=myUsername;Password=myPassword;
SpecifyingTCP/IPport
Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=;Database=myDataBase;User=myUsername;Password=myPassword;
Thedriverdefaultstoportvalue3306,ifnotspecifiedintheconnectionstring,as3306isthedefaultportforMySQL.
MySQLConnector/ODBC3.51
Type:ODBCDriverUsage:Driver={MySQLODBC3.51Driver}
Manufacturer:MySQLMoreinfoaboutthisdriver?Customizestringexamplevalues?
Localdatabase
Driver={MySQLODBC3.51Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Remotedatabase
Driver={MySQLODBC3.51Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
SpecifyingTCP/IPport
Driver={MySQLODBC3.51Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Thedriverdefaultstoportvalue3306,ifnotspecifiedintheconnectionstring,as3306isthedefaultportforMySQL.
Specifyingcharacterset
Driver={MySQLODBC3.51Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Notethatthecharsetoptionworksfromversion3.51.17ofthedriver.
Specifyingsocket
ThisonespecifiestheUnixsocketfileorWindowsnamedpipetoconnectto.Usedonlyforlocalclientconnections.
Driver={MySQLODBC3.51Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Socket=MySQL;Option=3;
OnWindows,thesocketvariableisthenameofthenamedpipethatisusedforlocalclientconnections.ThedefaultvalueisMySQL.
OnUnixplatforms,thesocketvariableisthenameofthesocketfilethatisusedforlocalclientconnections.Thedefaultis/tmp/mysql.sock.
UsingSSL
Driver={MySQLODBC3.51Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;
Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;
SSLCAspecifiesthepathtoafilewithalistoftrustSSLCAs
SSLCERTspecifiesthenameoftheSSLcertificatefiletouseforestablishingasecureconnection.
SSLKEYspecifiesthenameoftheSSLkeyfiletouseforestablishingasecureconnection.
MySQLConnector/ODBC5.1
Type:ODBCDriverUsage:Driver={MySQLODBC5.1Driver}Manufacturer:MySQLMoreinfoaboutthisdriver?Customizestringexamplevalues?
Localdatabase
Driver={MySQLODBC5.1Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Remotedatabase
Driver={MySQLODBC5.1Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
SpecifyingTCP/IPport
Driver={MySQLODBC5.1Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Thedriverdefaultstoportvalue3306,ifnotspecifiedintheconnectionstring,as3306isthedefaultportforMySQL.
Specifyingcharacterset
Driver={MySQLODBC5.1Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
Specifyingsocket
ThisonespecifiestheUnixsocketfileorWindowsnamedpipetoconnectto.Usedonlyforlocalclientconnections.
Driver={MySQLODBC5.1Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;Socket=MySQL;Option=3;
OnWindows,thesocketvariableisthenameofthenamedpipethatisusedforlocalclientconnections.ThedefaultvalueisMySQL.
OnUnixplatforms,thesocketvariableisthenameofthesocketfilethatisusedforlocalclientconnections.Thedefaultis/tmp/mysql.sock.
UsingSSL
Driver={MySQLODBC5.1Driver};Server=myServerAddress;Database=myDataBase;User=myUsername;Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;
SSLCAspecifiesthepathtoafilewithalistoftrustSSLCAs
SSLCERTspecifiesthenameoftheSSLcertificatefiletouseforestablishingasecureconnection.
SSLKEYspecifiesthenameoftheSSLkeyfiletouseforestablishingasecureconnection.
.NETFrameworkDataProviderforODBC
Type:.NETFrameworkWrapperClassLibraryUsage:System.Data.Odbc.OdbcConnectionManufacturer:MicrosoftMoreinfoaboutthiswrapperclasslibrary?Customizestringexamplevalues?
BridgingtoMySQLConnector/ODBC5.1
ThisisjustoneconnectionstringsampleforthewrappingOdbcConnectionclassthatcallstheunderlyingODBCDriver.SeerespectiveODBCdriverformoreconnectionstringstousewiththisclass.
Driver={MySQLODBC5.1Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;