Click or drag to resize

MySqlConnectionStringBuilder Class

Aids in the creation of connection strings by exposing the connection options as properties. Contains connection options specific to the Classic protocol.
Inheritance Hierarchy

Namespace:  MySql.Data.MySqlClient
Assembly:  MySql.Data (in MySql.Data.dll) Version: 8.0.22
Syntax
public sealed class MySqlConnectionStringBuilder : MySqlBaseConnectionStringBuilder

The MySqlConnectionStringBuilder type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAllowBatch
Gets or sets a boolean value that indicates whether this connection will allow commands to send multiple SQL statements in one execution.
Public propertyAllowLoadLocalInfile
Gets or sets a boolean value that indicates whether this connection will allow to load data local infile.
Public propertyAllowLoadLocalInfileInPath
Gets or sets the safe path where files can be read and uploaded to the server.
Public propertyAllowPublicKeyRetrieval
Gets or sets a boolean value that indicates if RSA public keys should be retrieved from the server.
Public propertyAllowUserVariables
Gets or sets a boolean value that indicates if the provider expects user variables in the SQL.
Public propertyAllowZeroDateTime
Gets or sets a boolean value that indicates if zero date time values are supported.
Public propertyAutoEnlist
Gets or sets a boolean value that indicates if an opened connection should particiapte in the current scope.
Public propertyBlobAsUTF8ExcludePattern
Gets or sets the pattern to match for the columns that should not be treated as UTF8.
Public propertyBlobAsUTF8IncludePattern
Gets or sets the pattern to match for the columns that should be treated as UTF8.
Public propertyBrowsableConnectionString
Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers.
(Inherited from DbConnectionStringBuilder.)
Public propertyCacheServerProperties
Gets or sets a boolean value that indicates whether the server variable settings are updated by a SHOW VARIABLES command each time a pooled connection is returned.
Public propertyCertificateFile
Gets or sets the path to the certificate file to be used.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyCertificatePassword
Gets or sets the password to be used in conjunction with the certificate file.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyCertificateStoreLocation
Gets or sets the location to a personal store where a certificate is held.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyCertificateThumbprint
Gets or sets a certificate thumbprint to ensure correct identification of a certificate contained within a personal store.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyCharacterSet
Gets or sets the character set that should be used for sending queries to the server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyCheckParameters
Gets or sets a boolean value that indicates if stored routine parameters should be checked against the server.
Public propertyCommandInterceptors
Gets or sets the list of interceptors that can intercept command operations.
Public propertyConnectionLifeTime
Gets or sets the lifetime of a pooled connection.
Public propertyConnectionProtocol
Gets or sets the protocol that should be used for communicating with MySQL.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyConnectionReset
Gets or sets a boolean value that indicates if the connection should be reset when retrieved from the pool.
Public propertyConnectionString
Gets or sets the connection string associated with the DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public propertyConnectionTimeout
Gets or sets the connection timeout.
Public propertyConvertZeroDateTime
Gets or sets a boolean value that indicates if zero datetime values should be converted to DateTime.MinValue.
Public propertyCount
Gets the current number of keys that are contained within the ConnectionString property.
(Inherited from DbConnectionStringBuilder.)
Public propertyDatabase
Gets or sets the name of the database for the initial connection.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyDefaultCommandTimeout
Gets or sets the default command timeout.
Public propertyDefaultTableCacheAge
Gets or sets the seconds for how long a TableDirect result should be cached.
Public propertyDnsSrv
Gets or sets a boolean value that indicates whether this connection should resolve DNS SRV records.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyExceptionInterceptors
Gets or sets the list of interceptors that can triage thrown MySqlExceptions.
Public propertyFunctionsReturnString
Gets or sets a boolean value that indicates if server functions should be treated as returning a string.
Public propertyIgnorePrepare
Gets or sets a boolean value that indicates if calls to the Prepare method should be ignored.
Public propertyIncludeSecurityAsserts
Gets or sets a boolean value that indicates if security asserts must be included.
Public propertyIntegratedSecurity
Gets or sets a boolean value that indicates if the connection should be encrypted.
Public propertyInteractiveSession
Gets or sets a boolean value that indicates if the session should be interactive.
Public propertyIsFixedSize
Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.
(Inherited from DbConnectionStringBuilder.)
Public propertyIsReadOnly
Gets a value that indicates whether the DbConnectionStringBuilder is read-only.
(Inherited from DbConnectionStringBuilder.)
Public propertyItem
Gets or sets a connection option.
(Overrides DbConnectionStringBuilderItemString.)
Public propertyKeepalive
Gets or sets the idle connection time(seconds) for TCP connections.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyKeys
Gets an ICollection that contains the keys in the DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public propertyLogging
Gets or sets a boolean value that indicates whether logging is enabled.
Public propertyMaximumPoolSize
Gets or sets the maximum connection pool setting.
Public propertyMinimumPoolSize
Gets the minimum connection pool size.
Public propertyOldGuids
Gets or sets a boolean value that indicates if items of data type BINARY(16) should be treated as guids.
Public propertyPassword
Gets or sets the password that should be used to make a connection.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyPersistSecurityInfo
Gets or sets a boolean value that indicates if the password should be persisted in the connection string.
Public propertyPipeName
Gets or sets the name of the named pipe that should be used for communicating with MySQL.
Public propertyPooling
Gets or sets a boolean value indicating if connection pooling is enabled.
Public propertyPort
Gets or sets the port number that is used when the socket protocol is being used.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyProcedureCacheSize
Gets or sets the size of the stored procedure cache.
Public propertyReplication
Gets or sets a boolean value that indicates if this connection will use replication.
Public propertyRespectBinaryFlags
Gets or sets a boolean value that indicates if column binary flags set by the server are ignored.
Public propertyServer
Gets or sets the name of the server.

The aliases 'address', 'addr' and 'network address' are deprecated as valid server synonyms.

(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySharedMemoryName
Gets or sets the base name of the shared memory objects used to communicate with MySQL when the shared memory protocol is being used.
Public propertySqlServerMode
Gets or sets a boolean value that indicates if SQL Server syntax should be allowed by supporting square brackets around symbols instead of backticks.
Public propertySshHostName
Gets or sets the name of the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySshKeyFile
Gets or sets the SSH key file to authenticate to the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySshPassphrase
Gets or sets the passphrase of the key file to authenticate to the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySshPassword
Gets or sets the password to authenticate to the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySshPort
Gets or sets the port number to use when authenticating to the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySshUserName
Gets or sets the user name to authenticate to the SSH server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySslCa (Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySslCert
Gets or sets the path to a local certificate file in PEM format to use for establishing an encrypted connection.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySslKey
Gets or sets the path to a local key file in PEM format to use for establishing an encrypted connection.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertySslMode
Indicates whether to use SSL connections and how to handle server certificate errors.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyTableCaching
Gets or sets a boolean value that indicates if caching of TableDirect commands is enabled.
Public propertyCode exampleTlsVersion
Sets the TLS versions to use in a SSL connection to the server.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyTreatBlobsAsUTF8
Indicates whether the driver should treat binary BLOBs as UTF8.
Public propertyTreatTinyAsBoolean
Gets or sets a boolean value that indicates if TINYINT(1) shound be treated as a BOOLEAN.
Public propertyUseAffectedRows
Gets or sets a boolean value that indicates if the server should report affected rows instead of found rows.
Public propertyUseCompression
Gets or sets a boolean value that indicates whether this connection should use compression.
Public propertyUseDefaultCommandTimeoutForEF
Public propertyUsePerformanceMonitor
Gets or sets a boolean value that indicates if the performance monitor hooks should be enabled.
Public propertyUserID
Gets or sets the user ID that should be used to connect with.
(Inherited from MySqlBaseConnectionStringBuilder.)
Public propertyUseUsageAdvisor
Gets or sets a boolean value that indicates if the Usage Advisor should be enabled.
Public propertyValues
Gets an ICollection that contains the values in the DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Top
Methods
  NameDescription
Public methodAdd
Adds an entry with the specified key and value into the DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public methodClear (Overrides DbConnectionStringBuilderClear.)
Protected methodClearPropertyDescriptors
Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public methodContainsKey (Overrides DbConnectionStringBuilderContainsKey(String).)
Public methodEquals (Overrides ObjectEquals(Object).)
Public methodEquivalentTo
Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.
(Inherited from DbConnectionStringBuilder.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetConnectionString (Inherited from MySqlBaseConnectionStringBuilder.)
Public methodGetHashCode (Inherited from MySqlBaseConnectionStringBuilder.)
Protected methodGetProperties
Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove (Overrides DbConnectionStringBuilderRemove(String).)
Public methodShouldSerialize
Indicates whether the specified key exists in this DbConnectionStringBuilder instance.
(Inherited from DbConnectionStringBuilder.)
Public methodToString
Returns the connection string associated with this DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Public methodTryGetValue
Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder.
(Inherited from DbConnectionStringBuilder.)
Top
See Also