Search Results for

    Show / Hide Table of Contents

    Class MySqlBaseConnectionStringBuilder

    Abstract class that provides common functionality for connection options that apply for all protocols.

    Inheritance
    System.Object
    System.Data.Common.DbConnectionStringBuilder
    MySqlBaseConnectionStringBuilder
    MySqlConnectionStringBuilder
    MySqlXConnectionStringBuilder
    Implements
    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ComponentModel.ICustomTypeDescriptor
    Namespace: MySql.Data.MySqlClient
    Assembly: MySql.Data.dll
    Version: 9.3.0
    Syntax
    public abstract class MySqlBaseConnectionStringBuilder : DbConnectionStringBuilder, IDictionary, ICollection, IEnumerable, ICustomTypeDescriptor

    Properties

    CertificateFile

    Gets or sets the path to the certificate file to be used.

    Declaration
    public string CertificateFile { get; set; }
    Property Value
    Type Description
    System.String

    CertificatePassword

    Gets or sets the password to be used in conjunction with the certificate file.

    Declaration
    public string CertificatePassword { get; set; }
    Property Value
    Type Description
    System.String

    CertificateStoreLocation

    Gets or sets the location to a personal store where a certificate is held.

    Declaration
    public MySqlCertificateStoreLocation CertificateStoreLocation { get; set; }
    Property Value
    Type Description
    MySqlCertificateStoreLocation

    CertificateThumbprint

    Gets or sets a certificate thumbprint to ensure correct identification of a certificate contained within a personal store.

    Declaration
    public string CertificateThumbprint { get; set; }
    Property Value
    Type Description
    System.String

    CharacterSet

    Gets or sets the character set that should be used for sending queries to the server.

    Declaration
    public string CharacterSet { get; set; }
    Property Value
    Type Description
    System.String

    ConnectionProtocol

    Gets or sets the protocol that should be used for communicating with MySQL.

    Declaration
    public MySqlConnectionProtocol ConnectionProtocol { get; set; }
    Property Value
    Type Description
    MySqlConnectionProtocol

    Database

    Gets or sets the name of the database for the initial connection.

    Declaration
    public string Database { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    There is no default for this property and, if not set, the connection will not have a current database.

    DnsSrv

    Gets or sets a boolean value that indicates whether this connection should resolve DNS SRV records.

    Declaration
    public bool DnsSrv { get; set; }
    Property Value
    Type Description
    System.Boolean

    Keepalive

    Gets or sets the idle connection time(seconds) for TCP connections.

    Declaration
    public uint Keepalive { get; set; }
    Property Value
    Type Description
    System.UInt32

    Password

    Gets or sets the password that should be used to make a connection.

    Declaration
    public string Password { get; set; }
    Property Value
    Type Description
    System.String

    Password2

    Gets or sets the password for a second authentication that should be used to make a connection.

    Declaration
    public string Password2 { get; set; }
    Property Value
    Type Description
    System.String

    Password3

    Gets or sets the password for a third authentication that should be used to make a connection.

    Declaration
    public string Password3 { get; set; }
    Property Value
    Type Description
    System.String

    Port

    Gets or sets the port number that is used when the socket protocol is being used.

    Declaration
    public uint Port { get; set; }
    Property Value
    Type Description
    System.UInt32

    Server

    Gets or sets the name of the server.

    Declaration
    public string Server { get; set; }
    Property Value
    Type Description
    System.String

    The server.

    Remarks

    If this property is not set, then the provider will attempt to connect tolocalhost even though this property will return String.Empty.

    SslCa

    Declaration
    public string SslCa { get; set; }
    Property Value
    Type Description
    System.String

    SslCert

    Gets or sets the path to a local certificate file in PEM format to use for establishing an encrypted connection.

    Declaration
    public string SslCert { get; set; }
    Property Value
    Type Description
    System.String

    SslKey

    Gets or sets the path to a local key file in PEM format to use for establishing an encrypted connection.

    Declaration
    public string SslKey { get; set; }
    Property Value
    Type Description
    System.String

    SslMode

    Indicates whether to use SSL connections and how to handle server certificate errors.

    Declaration
    public MySqlSslMode SslMode { get; set; }
    Property Value
    Type Description
    MySqlSslMode

    TlsVersion

    Sets the TLS versions to use in a SSL connection to the server.

    Declaration
    public string TlsVersion { get; set; }
    Property Value
    Type Description
    System.String
    Examples

    Tls version=TLSv1.2,TLSv1.3;

    UserID

    Gets or sets the user ID that should be used to connect with.

    Declaration
    public string UserID { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    GetConnectionString(Boolean)

    Declaration
    public string GetConnectionString(bool includePass)
    Parameters
    Type Name Description
    System.Boolean includePass
    Returns
    Type Description
    System.String

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    TryGetValue(String, out Object)

    Declaration
    public abstract override bool TryGetValue(string keyword, out object value)
    Parameters
    Type Name Description
    System.String keyword
    System.Object value
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Data.Common.DbConnectionStringBuilder.TryGetValue(System.String, System.Object)

    Implements

    System.Collections.IDictionary
    System.Collections.ICollection
    System.Collections.IEnumerable
    System.ComponentModel.ICustomTypeDescriptor
    In This Article
    • Properties
      • CertificateFile
      • CertificatePassword
      • CertificateStoreLocation
      • CertificateThumbprint
      • CharacterSet
      • ConnectionProtocol
      • Database
      • DnsSrv
      • Keepalive
      • Password
      • Password2
      • Password3
      • Port
      • Server
      • SslCa
      • SslCert
      • SslKey
      • SslMode
      • TlsVersion
      • UserID
    • Methods
      • GetConnectionString(Boolean)
      • GetHashCode()
      • TryGetValue(String, out Object)
    • Implements
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.