MySQL Connector/Net
Type: .NET Framework Class LibraryUsage: MySql.Data.MySqlClient.MySqlConnection
Manufacturer: MySQL
Standard
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Specifying port
Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Named pipes
Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Multiple servers
Use this to connect to a server in a replicated server configuration without concern on which server to use.
Server=serverAddress1 & serverAddress2 & etc..;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
- Server=serverAddress1 & serverAddress2 & etc..;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Using encryption
This one activates SSL encryption for all data sent between the client and server. The server needs to have a certificate installed.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encryption=true;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encryption=true;
Using encryption, alternative
Some reported problems with the above one. Try replacing the key "Encryption" with "Encrypt" instead.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;
Specifying default command timeout
Use this one to specify a default command timeout for the connection. Please note that the property in the connection string does not supercede the individual command timeout property on an individual command object.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;default command timeout=20;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;default command timeout=20;
Specifying connection attempt timeout
Use this one to specify the length in seconds to wait for a server connection before terminating the attempt and receive an error.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Connection Timeout=5;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Connection Timeout=5;
Inactivating prepared statements
Use this one to instruct the provider to ignore any command prepare statements and prevent corruption issues with server side prepared statements.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Ignore Prepare=true;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Ignore Prepare=true;
Specifying port
Use this one to specify what port to use for the connection.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Port=3306;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Port=3306;
Specifying network protocol
Use this one to specify which network protocol to use for the connection.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Protocol=socket;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Protocol=socket;
Specifying character set
Use this one to specify which character set to use to encode queries sent to the server.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=UTF8;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=UTF8;
Specifying shared memory name
Use this one to specify the shared memory object name used for the communication.
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Shared Memory Name=MYSQL;
- Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Shared Memory Name=MYSQL;
eInfoDesigns.dbProvider
Type: .NET Framework Class LibraryUsage: eInfoDesigns.dbProvider.MySqlClient.MySqlConnection
Manufacturer: eInfoDesigns
Standard
Data Source=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Command Logging=false;
- Data Source=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Command Logging=false;
SevenObjects MySqlClient
Type: .NET Framework Class LibraryUsage:
Manufacturer: SevenObjects
Standard
Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;
- Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;
dotConnect for MySQL (former MyDirect.NET and Core Labs MySQLDirect.NET)
Type: .NET Framework Class LibraryUsage: Devart.Data.MySql.MySqlConnection
Manufacturer: Devart
Standard
User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;
- User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;
MySQLDriverCS
Type: .NET Framework Class LibraryUsage: MySQLDriverCS.MySQLConnection
Manufacturer: MySQLDriverCS project team
Standard
Location=myServerAddress;Data Source=myDataBase;User ID=myUsername;Password=myPassword;Port=3306;Extended Properties="""";
- Location=myServerAddress;Data Source=myDataBase;User ID=myUsername;Password=myPassword;Port=3306;Extended Properties="""";
MySQL OLEDB
Type: OLE DB ProviderUsage: Provider=MySQLProv
Manufacturer: MySQL
Standard
Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;
- Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;
.NET Framework Data Provider for OLE DB
Type: .NET Framework Wrapper Class LibraryUsage: System.Data.OleDb.OleDbConnection
Manufacturer: Microsoft
Bridging to MySQL OLEDB This is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.
Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;
- Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;
MyODBC 2.50
Type: ODBC DriverUsage: Driver={mySQL}
Manufacturer: MySQL
Local database
Driver={mySQL};Server=localhost;Option=16834;Database=myDataBase;
- Driver={mySQL};Server=localhost;Option=16834;Database=myDataBase;
Remote database
Driver={mySQL};Server=myServerAddress;Option=131072;Stmt=;Database=myDataBase; User=myUsername;Password=myPassword;
- Driver={mySQL};Server=myServerAddress;Option=131072;Stmt=;Database=myDataBase; User=myUsername;Password=myPassword;
Specifying TCP/IP port
Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=; Database=myDataBase; User=myUsername;Password=myPassword;
- Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=; Database=myDataBase; User=myUsername;Password=myPassword;
MySQL Connector/ODBC 3.51
Type: ODBC DriverUsage: Driver={MySQL ODBC 3.51 Driver}
Manufacturer: MySQL
Local database
Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
- Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
Remote database
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying TCP/IP port
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying character set
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying socket
This one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.
Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;
- Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;
Using SSL
Driver={MySQL ODBC 3.51 Driver};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;
- Driver={MySQL ODBC 3.51 Driver};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;
MySQL Connector/ODBC 5.1
Type: ODBC DriverUsage: Driver={MySQL ODBC 5.1 Driver}
Manufacturer: MySQL
Local database
Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
Remote database
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying TCP/IP port
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying character set
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;
Specifying socket
This one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.
Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;
Using SSL
Driver={MySQL ODBC 5.1 Driver};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;
- Driver={MySQL ODBC 5.1 Driver};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;
.NET Framework Data Provider for ODBC
Type: .NET Framework Wrapper Class LibraryUsage: System.Data.Odbc.OdbcConnection
Manufacturer: Microsoft
Bridging to MySQL Connector/ODBC 5.1
This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.
Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
- Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
Source: www.connectionstrings.com/mysql
Download Connectors from dev.MySQL.com