You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add [Category] and [DisplayName] to all connection options. Fixes#1030
This aligns the PropertyDescriptor.DisplayName with the DbConnectionStringBuilder key for getting/setting the property.
Fixes ICustomTypeDescriptor-related issues with MySqlConnectionStringBuilder.
Rearranged connection string option documentation to put the DisplayName first in the list of synonyms.
This does introduce breaking changes for anyone who was depending on the exact format of option keys in the rendered connection string. (All previous options are still accepted.)
Copy file name to clipboardExpand all lines: docs/content/connection-options.md
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ These are the basic options that need to be defined to connect to a MySQL databa
32
32
<th style="width: 70%">Description</th>
33
33
</thead>
34
34
<trid="Host">
35
-
<td><a name="Server"></a>Host, Server, Data Source, DataSource, Address, Addr, Network Address</td>
35
+
<td><a name="Server"></a>Server, Host, Data Source, DataSource, Address, Addr, Network Address</td>
36
36
<td>localhost</td>
37
37
<td>The host name or network address of the MySQL Server to which to connect. Multiple hosts can be specified in a comma-delimited list.<br>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. Only a single socket name can be specified.</td>
38
38
</tr>
@@ -42,7 +42,7 @@ These are the basic options that need to be defined to connect to a MySQL databa
42
42
<td>The TCP port on which MySQL Server is listening for connections.</td>
43
43
</tr>
44
44
<trid="UserId">
45
-
<td>User Id, UserID, Username, Uid, User name, User</td>
45
+
<td>User ID, UserID, Username, Uid, User name, User</td>
46
46
<td></td>
47
47
<td>The MySQL user ID.</td>
48
48
</tr>
@@ -56,8 +56,8 @@ These are the basic options that need to be defined to connect to a MySQL databa
56
56
<td></td>
57
57
<td>(Optional) The case-sensitive name of the initial database to use. This may be required if the MySQL user account only has access rights to particular databases on the server.</td>
<td>How to connect to the MySQL Server. This option has the following values:
63
63
<ul>
@@ -68,7 +68,7 @@ These are the basic options that need to be defined to connect to a MySQL databa
68
68
</td>
69
69
</tr>
70
70
<trid="PipeName">
71
-
<td>Pipe, PipeName, Pipe Name</td>
71
+
<td>Pipe Name, Pipe, PipeName</td>
72
72
<td>MYSQL</td>
73
73
<td>The name of the Windows named pipe to use to connect to the server. You must also set <code>ConnectionProtocol=pipe</code> to used named pipes.</td>
74
74
</tr>
@@ -109,17 +109,17 @@ These are the options that need to be used in order to configure a connection to
109
109
<td>Specifies the password for the certificate specified using the <code>CertificateFile</code> option. Not required if the certificate file is not password protected.</td>
110
110
</tr>
111
111
<trid="SslCert">
112
-
<td>SslCert, Ssl-Cert</td>
112
+
<td>SSL Cert, SslCert, Ssl-Cert</td>
113
113
<td></td>
114
114
<td>Specifies the path to the client’s SSL certificate file in PEM format. <code>SslKey</code> must also be specified, and <code>CertificateFile</code> should not be. This option is not supported on <code>netstandard2.0</code>.</td>
115
115
</tr>
116
116
<trid="SslKey">
117
-
<td>SslKey, Ssl-Key</td>
117
+
<td>SSL Key, SslKey, Ssl-Key</td>
118
118
<td></td>
119
119
<td>Specifies the path to the client’s SSL private key in PEM format. <code>SslCert</code> must also be specified, and <code>CertificateFile</code> should not be.</td>
<td>SSL CA, CA Certificate File, CACertificateFile, SslCa, Ssl-Ca</td>
123
123
<td></td>
124
124
<td>This option specifies the path to a CA certificate file in a PEM Encoded (.pem) format. This should be used with <code>SslMode=VerifyCA</code> or <code>SslMode=VerifyFull</code> to enable verification of a CA certificate that is not trusted by the Operating System’s certificate store.</td>
125
125
</tr>
@@ -134,12 +134,12 @@ These are the options that need to be used in order to configure a connection to
134
134
<td>Specifies which certificate should be used from the Certificate Store specified in the setting above. This option must be used to indicate which certificate in the store should be used for authentication.</td>
135
135
</tr>
136
136
<trid="TlsCipherSuites">
137
-
<td>Tls Cipher Suites,TlsCipherSuites</td>
137
+
<td>TLS Cipher Suites,TlsCipherSuites</td>
138
138
<td></td>
139
139
<td>Specifies which TLS cipher suites may be used during TLS negotiation. The default value (the empty string) allows the OS to determine the TLS cipher suites to use; this is the recommended setting. Otherwise, specify a comma-delimited list of <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.security.tlsciphersuite"><code>TlsCipherSuite</code> enum values</a> to allow just those cipher suites. (This option is only supported on Linux when using .NET Core 3.1 or .NET 5.0 or later.)</td>
140
140
</tr>
141
141
<trid="TlsVersion">
142
-
<td>Tls Version, TlsVersion, Tls-Version</td>
142
+
<td>TLS Version, TlsVersion, Tls-Version</td>
143
143
<td></td>
144
144
<td>Specifies which TLS versions may be used during TLS negotiation. The default value of <code>null</code> allows the OS to determine the TLS version to use (see <a href="https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls" title="Transport Layer Security (TLS) best practices with the .NET Framework">documentation</a>); this is the recommended setting. Otherwise, to restrict the versions that can be used, specify a comma-delimited list of versions taken from the following: <code>TLS 1.0</code>, <code>TLS 1.1.</code>, <code>TLS 1.2</code>, <code>TLS 1.3</code>. (This option allows each version to be specified in a few different formats: <code>Tls12</code>, <code> Tlsv1.2</code>, <code>TLS 1.2</code>, <code>Tls v1.2</code>; they are treated equivalently.)</td>
145
145
</tr>
@@ -194,12 +194,12 @@ Connection pooling is enabled by default. These options are used to configure it
194
194
<td><code>true</code></td>
195
195
<td>If <code>true</code>, the connection state is not reset until the connection is retrieved from the pool. The experimental value of <code>false</code> resets connections in the background after they’re closed which can make opening a connection faster, and releases server resources sooner; however, there are reports of connection pool exhaustion when using this value.</td>
196
196
</tr>
197
-
<trid="MaxPoolSize">
197
+
<trid="MaximumPoolSize">
198
198
<td>Maximum Pool Size, Max Pool Size, MaximumPoolsize, maxpoolsize</td>
199
199
<td>100</td>
200
200
<td>The maximum number of connections allowed in the pool.</td>
201
201
</tr>
202
-
<trid="MinPoolSize">
202
+
<trid="MinimumPoolSize">
203
203
<td>Minimum Pool Size, Min Pool Size, MinimumPoolSize, minpoolsize</td>
204
204
<td>0</td>
205
205
<td>The minimum number of connections to leave in the pool if ConnectionIdleTimeout is reached.</td>
@@ -232,82 +232,82 @@ These are the other options that MySqlConnector supports. They are set to sensib
232
232
<th style="width: 70%">Description</th>
233
233
</thead>
234
234
<trid="AllowLoadLocalInfile">
235
-
<td>AllowLoadLocalInfile, Allow Load Local Infile</td>
235
+
<td>Allow Load Local Infile, AllowLoadLocalInfile</td>
236
236
<td>false</td>
237
237
<td>Allows the <code>LOAD DATA LOCAL</code> command to request files from the client. This is disabled by
238
238
default as a <a href="/troubleshooting/load-data-local-infile/" title="Using Load Data Local Infile">security precaution</a>.
239
239
In order to use <code>MySqlBulkLoader</code> and set its <code>Local</code> property to <code>true</code>, you
240
240
must set this option to <code>True</code> in your connection string.</td>
241
241
</tr>
242
-
<trid="AllowublicKeyRetrieval">
243
-
<td>AllowPublicKeyRetrieval, Allow Public Key Retrieval</td>
242
+
<trid="AllowPublicKeyRetrieval">
243
+
<td>Allow Public Key Retrieval, AllowPublicKeyRetrieval</td>
244
244
<td>false</td>
245
245
<td>If the user account uses <code>sha256_password</code> authentication, the password must be protected during transmission; TLS is the preferred mechanism for this,
246
246
but if it is not available then RSA public key encryption will be used. To specify the server’s RSA public key, use the <code>ServerRSAPublicKeyFile</code> connection
247
247
string setting, or set <code>AllowPublicKeyRetrieval=True</code> to allow the client to automatically request the public key from the server. Note that <code>AllowPublicKeyRetrieval=True</code>
248
248
could allow a malicious proxy to perform a MITM attack to get the plaintext password, so it is <code>False</code> by default and must be explicitly enabled.</td>
249
249
</tr>
250
250
<trid="AllowUserVariables">
251
-
<td>AllowUserVariables, Allow User Variables</td>
251
+
<td>Allow User Variables, AllowUserVariables</td>
252
252
<td>false</td>
253
253
<td>Allows user-defined variables (prefixed with <code>@</code>) to be used in SQL statements. The default value (<code>false</code>)
254
254
only allows <code>@</code>-prefixed names to refer to command parameters.</td>
255
255
</tr>
256
256
<trid="AllowZeroDateTime">
257
-
<td>AllowZeroDateTime, Allow Zero DateTime</td>
257
+
<td>Allow Zero DateTime, AllowZeroDateTime</td>
258
258
<td>false</td>
259
259
<td>If set to <c>true</c> all <code>DATE</code>, <code>DATETIME</code> and <code>TIMESTAMP</code> columns are returned as <code>MySqlDateTime</code> objects instead of <code>DateTime</code>.
260
260
This allows the special “zero” date value <code>0000-00-00</code> to be retrieved from the database. If <code>false</code> (the default)
261
261
date columns are returned as <code>DateTime</code> values, and an exception is thrown for unrepresentable dates.</td>
262
262
</tr>
263
263
<trid="ApplicationName">
264
-
<td>ApplicationName, Application Name</td>
264
+
<td>Application Name, ApplicationName</td>
265
265
<td>null</td>
266
266
<td>Sets the <c>program_name</c> connection attribute passed to MySQL Server. This value may be displayed by diagnostic tools,
267
267
e.g., as the “Program” column in “Client Connections” in <a href="https://www.mysql.com/products/workbench/">MySQL Workbench</a>.</td>
268
268
</tr>
269
269
<trid="AutoEnlist">
270
-
<td>AutoEnlist, Auto Enlist</td>
270
+
<td>Auto Enlist, AutoEnlist</td>
271
271
<td>true</td>
272
272
<td>If <code>true</code> (default), <code>MySqlConnection</code> will detect if there is an active <code>TransactionScope</code> when it's opened and automatically enlist in it. If <code>false</code>, connections must be manually enlisted by calling <code>EnlistTransaction</code>.</td>
<td>The length of time (in seconds) to wait for a query to be canceled when <code>MySqlCommand.CommandTimeout</code> expires, or zero for no timeout. If a response isn’t received from the server in this
278
278
time, the local socket will be closed and a <code>MySqlException</code> will be thrown.</td>
279
279
</tr>
280
-
<trid="CharSet">
281
-
<td>CharSet, Character Set, CharacterSet</td>
280
+
<trid="CharacterSet">
281
+
<td>Character Set, CharSet, CharacterSet</td>
282
282
<td>utf8mb4</td>
283
283
<td>MySqlConnector always uses <code>utf8mb4</code> to send and receive strings from MySQL Server. This option may be specified (for backwards compatibility) but it will be ignored.</td>
284
284
</tr>
285
-
<trid="Compress">
286
-
<td>Compress, Use Compression, UseCompression</td>
<td>The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.</td>
296
296
</tr>
297
297
<trid="ConvertZeroDateTime">
298
-
<td>Convert Zero Datetime, ConvertZeroDateTime</td>
298
+
<td>Convert Zero DateTime, ConvertZeroDateTime</td>
299
299
<td>false</td>
300
300
<td>True to have <code>MySqlDataReader.GetValue()</code> and <code>MySqlDataReader.GetDateTime()</code> return <code>DateTime.MinValue</code> for date or datetime columns that have disallowed values.</td>
301
301
</tr>
302
302
<trid="DateTimeKind">
303
-
<td>DateTimeKind</td>
303
+
<td>DateTime Kind, DateTimeKind</td>
304
304
<td>Unspecified</td>
305
305
<td>The <code>DateTimeKind</code> used when <code>MySqlDataReader</code> returns a <code>DateTime</code>. If set to <code>Utc</code> or <code>Local</code>,
306
306
a <code>MySqlException</code> will be thrown if a <code>DateTime</code> command parameter has a <code>Kind</code> of <code>Local</code> or <code>Utc</code>,
307
307
respectively.</td>
308
308
</tr>
309
309
<trid="GuidFormat">
310
-
<td>GuidFormat</td>
310
+
<td>GUID Format, GuidFormat</td>
311
311
<td>Default</td>
312
312
<td><p>Determines which column type (if any) should be read as a <code>System.Guid</code>.
313
313
The options include:</p>
@@ -337,19 +337,19 @@ These are the other options that MySqlConnector supports. They are set to sensib
337
337
for more explanation of how this is determined.</td>
<td>If <code>true</code>, the value of <code>MySqlCommand.Transaction</code> is ignored when commands are executed.
343
343
This matches the Connector/NET behaviour and can make porting code easier. For more information, see <a href="troubleshooting/transaction-usage/">Transaction Usage</a>.</td>
344
344
</tr>
345
345
<trid="IgnorePrepare">
346
-
<td>IgnorePrepare, Ignore Prepare</td>
346
+
<td>Ignore Prepare, IgnorePrepare</td>
347
347
<td>false</td>
348
348
<td>If <code>true</code>, calls to <code>MySqlCommand.Prepare(Async)</code> are ignored (and will be no-ops).
349
349
This option is provided for backwards compatibility with MySQL Connector/NET (before 8.0.23) and should not be used.</td>
<td>If <code>true</code>, the session <code>wait_timeout</code> variable is initialized from the global <code>interactive_timeout<code> value instead of the global <code>wait_timeout</code> value.</td>
355
355
</tr>
@@ -392,7 +392,7 @@ These are the other options that MySqlConnector supports. They are set to sensib
392
392
<td>When set to <code>false</code> or no (strongly recommended), security-sensitive information, such as the password, is not returned as part of the connection string if the connection is open or has ever been in an open state. Resetting the connection string resets all connection string values, including the password. Recognized values are true, false, yes, and no.</td>
393
393
</tr>
394
394
<trid="ServerRedirectionMode">
395
-
<td>ServerRedirectionMode, Server Redirection Mode</td>
<td><p>Whether to use server redirection. The options include:</p>
398
398
<dl>
@@ -408,12 +408,12 @@ These are the other options that MySqlConnector supports. They are set to sensib
408
408
</td>
409
409
</tr>
410
410
<trid="ServerRsaPublicKeyFile">
411
-
<td>ServerRsaPublicKeyFile, Server RSA Public Key File</td>
411
+
<td>Server RSA Public Key File, ServerRsaPublicKeyFile</td>
412
412
<td></td>
413
413
<td>For <code>sha256_password</code> authentication. See comments under <code>AllowPublicKeyRetrieval</code>.</td>
414
414
</tr>
415
415
<trid="ServerSPN">
416
-
<td>ServerSPN, Server SPN</td>
416
+
<td>Server SPN, ServerSPN</td>
417
417
<td></td>
418
418
<td>For MariaDB <a href="https://mariadb.com/kb/en/library/authentication-plugin-gssapi/"><code>auth_gssapi_client</code></a> authentication. Specifies the server’s Service Principal Name (to verify that authentication is occurring with the correct server).</td>
0 commit comments