SslKey must also be specified, and CertificateFile should not be. The path to the client’s SSL certificate file in PEM format.
IIS SQL SERVER CONNECTION STRING PASSWORD
Not required if the certificate file is not password protected. The password for the certificate specified using the CertificateFile option. The property should be set to an async delegate that will populate a X509CertificateCollection with the client certificate(s) needed to connect.Ĭertificate Password, CertificatePassword If the certificate can't be loaded from a file path, leave this value empty and set MySqlConnection.ProvideClientCertificatesCallback before calling MySqlConnection.Open. This option should not be specified if SslCert and SslKey are used. To create a PKCS #12 bundle from a PEM encoded Certificate and Key, use openssl pkcs12 -in cert.pem -inkey key.pem -export -out bundle.pfx. The path to a certificate file in PKCS #12 (.pfx) format containing a bundled Certificate and Private Key used for mutual authentication. Validates the CA but tolerates hostname mismatch.
Deny connection if server does not support SSL. These are the options that need to be used in order to configure a connection to use SSL/TLS. You must also set ConnectionProtocol=pipe to used named pipes.
IIS SQL SERVER CONNECTION STRING WINDOWS
The name of the Windows named pipe to use to connect to the server. This may be required if the MySQL user account only has access rights to particular databases on the server.Ĭonnection Protocol, ConnectionProtocol, Protocol (Optional) The case-sensitive name of the initial database to use. This retains the benefits of connection pooling. User ID, UserID, Username, Uid, User name, Userįor systems that use frequently-updated authentication tokens (such as Amazon Aurora RDS with IAM Authentication), leave this value empty, and set MySqlConnection.ProvidePasswordCallback to a delegate that will provide the password (or authentication token) on demand before calling MySqlConnection.Open. The TCP port on which MySQL Server is listening for connections. Only a single socket name can be specified. On Unix-like systems, this can be a fully qualified path to a MySQL socket file, which will cause a Unix socket to be used instead of a TCP/IP socket. Multiple hosts can be specified in a comma-delimited list. The host name or network address of the MySQL Server to which to connect. Server, Host, Data Source, DataSource, Address, Addr, Network Address These are the basic options that need to be defined to connect to a MySQL database. There are also several unique options that are supported only by MySqlConnector, a replacement for MySql.Data that fixes bugs,Īdds new features, and improves database access performance. New MySqlConnection("server=YOURSERVER user=YOURUSERID password=YOURPASSWORD")įor all the other options, see the tables below. The simplest MySQL connection string for C# is: