2026
Every post published in 2026, newest first. Pick a month to narrow it down.
- Posts
- 1,054
- Topics
- 114
- Reading time
- 128 h
- Active months
- 6
Posts 391–420 of 1,054 · November 6, 2026
Page 14 of 36
November 2026
802 postsFriday, November 6, 2026
30 of 99 posts
How to Clear the MySql.Data Connection Pool
MySqlConnection.ClearPool closes the idle connections of one pool, and ClearAllPools closes them for all, so that the next open starts fresh. See the connection id change, and when you'd want this. Real output from .NET 10 and MySql.Data 26.10.0.
4 min readHow to Set the Connect Timeout in MySql.Data
Connect Timeout limits how long the driver waits for a MySQL connection, and with retries it multiplies: an unreachable server held a request for 64 seconds on the default, and 24 with Connect Timeout=5. Real measurements from .NET 10 and MySQL 9.7.
4 min readHow to Set Connection Lifetime in MySql.Data
Connection Lifetime retires a pooled MySQL connection once it's old enough, so a server you've failed over to gets its share. It's checked when a connection is returned, not while it's idle. Real output from .NET 10 and MySql.Data 26.10.0.
5 min readHow Long Does MySql.Data Keep Idle Connections in the Pool?
MySql.Data closes idle pooled connections after about 3 minutes, down to Minimum Pool Size. I opened 8 connections, closed them, and counted them each minute. Real results from .NET 10 and MySQL 9.7.
5 min readHow to Size the MySql.Data Connection Pool
Measure how many connections your .NET C# API uses, see why a bigger pool wasn't faster, and work out Maximum Pool Size against MySQL's max_connections, including the second pool nobody mentions. Real numbers from EF Core 10 and MySQL 9.7.
5 min readHow to See the MySql.Data Connection Pool Working
Open and close a MySQL connection four times, and print its id and how long it took. With the pool, it's the same connection at 0 ms. Without it, a new one each time. Real numbers from .NET 10, MySql.Data 26.10.0 and MySQL 9.7.
5 min readHow to Read and Build a Connection String with MySqlConnectionStringBuilder
MySqlConnectionStringBuilder writes a valid MySQL connection string, whatever the password holds, and reads one back into named settings with their defaults. Use it to log settings without the password. Real output from .NET 10.
4 min readHow to Put Special Characters in a MySQL Password in a .NET C# Connection String
A ; or a quote in a MySQL password can break a connection string, and the error can show part of the password. Quote the value, or let MySqlConnectionStringBuilder do it. Every case tested with .NET 10 and MySql.Data 26.10.0.
4 min readHow to Use TLS 1.3 with MySql.Data in .NET C#
MySql.Data uses TLS 1.2 on every platform unless you set TlsVersion. Add it for TLS 1.3 on Linux, plus a .NET 10 switch on macOS. Real output from .NET 10, MySql.Data 26.10.0 and MySQL 9.7.
5 min readHow to Use VerifyFull with MySql.Data in .NET C#
SslMode=VerifyFull checks the MySQL server's CA and host name, and MySql.Data needs a client certificate and key to do it, in a specific format, though it never sends them. Every step, for Docker and for managed servers. Real output from .NET 10 and MySQL 9.7.
7 min readHow to Verify a MySQL Server Certificate in .NET C# with VerifyCA
Make a .NET C# app refuse any MySQL server whose certificate wasn't signed by your CA: copy the CA, add two connection string options, and test it against the wrong server. Real output from MySql.Data 26.10.0 and MySQL 9.7.
6 min readMySql.Data SslMode Options Explained: Disabled, Preferred, Required, VerifyCA and VerifyFull
What each SslMode in MySql.Data encrypts and checks, tested against a second server with the same password, and which one to use. Real output from .NET 10, MySql.Data 26.10.0 and MySQL 9.7.
7 min readHow to Undo SET PERSIST in MySQL
RESET PERSIST forgets a saved MySQL setting, but it doesn't change the running value. You need a SET GLOBAL as well, or a restart. See which settings are persisted, and undo one. Real output from MySQL 9.7.
3 min readHow to Change wait_timeout in MySQL
wait_timeout is how long MySQL lets a connection sit idle before closing it, and interactive_timeout is the same for the mysql client. See both, change them, and watch what happens to a session and to a .NET connection pool. Real output from MySQL 9.7.
4 min readHow to Change max_connections in MySQL and Keep It After a Restart
SET GLOBAL changes max_connections until the next restart, and SET PERSIST keeps it. Change it, restart, check where the value came from, and put it back. Real output from MySQL 9.7.
4 min readHow to See How Many Connections MySQL Has Now and at Its Peak
Threads_connected shows MySQL's connections now, Max_used_connections shows the peak since it started, and performance_schema.threads shows who has them. Compare them with max_connections. Real output from MySQL 9.7.
4 min readHow to Generate a Random Password for a MySQL Account
IDENTIFIED BY RANDOM PASSWORD makes MySQL create the password and show it once. It's quick, and it often holds characters that break connection strings. See both, and how long it is. Real output from MySQL 9.7.
3 min readHow to Turn On the MySQL Password Policy with validate_password
MySQL's validate_password component refuses weak passwords, and the Docker image doesn't turn it on. Install it, read the rules, score a password, and take it out again. Real output from MySQL 9.7.
4 min readHow to Lock and Unlock a MySQL Account
ACCOUNT LOCK stops a MySQL account from signing in without changing its password or rights, and open sessions keep working. See it live, then find and close those sessions too. Real output from MySQL 9.7.
4 min readHow to Restrict a MySQL Account to One Host or Network
A MySQL account is a name and a host. Replace % with an address or a network, and the same password stops working from anywhere else. See how to find the address your app connects from. Real output from MySQL 9.7.
4 min readHow to Limit How Many Connections a MySQL Account Can Open
MAX_USER_CONNECTIONS stops one MySQL account from using up the server's connections. Set it, see what happens at the limit, and make your connection pool agree with it. Real output from MySQL 9.7.
4 min readHow to Change a MySQL Password Without Downtime
RETAIN CURRENT PASSWORD lets a MySQL account's old and new passwords both work while you update your app, and DISCARD OLD PASSWORD ends the old one. Step by step, with what a running connection pool does. Real output from MySQL 9.7.
4 min readHow to Create a MySQL Account for Running Migrations
Migrations need rights a running app shouldn't have, so give them their own account. I removed each right in turn to find exactly which ones EF Core migrations need on MySQL, including rolling back. Real results from MySQL 9.7.
4 min readHow to Take Rights Away from a MySQL Account with REVOKE
REVOKE removes rights from a MySQL account, and FLUSH PRIVILEGES isn't needed. A session that's already open keeps a database-level right until its next USE, which I tested live. Real output from MySQL 9.7.
5 min readHow to Create a MySQL Account with Only the Rights an App Needs
Give an application a MySQL account that can read and change rows on one database, and nothing else, so a bug or an injected query can't drop a table. Create it, test what it refuses, and test what it needs. Real output from MySQL 9.7.
4 min readHow to See What a MySQL Account Can Do with SHOW GRANTS
SHOW GRANTS lists an account's rights, and USAGE means none at all. Check your own or someone else's, read each line, and see which accounts exist. Real output from MySQL 9.7.
4 min readHow to Choose the TLS Versions MySQL Accepts
See which TLS versions MySQL allows with tls_version, change them with SET PERSIST and ALTER INSTANCE RELOAD TLS, and test from a client. Know what TLS 1.3 only does to .NET clients first. Real output from MySQL 9.7.
4 min readHow to Require a Client Certificate for a MySQL Account
REQUIRE X509 makes a MySQL account present a certificate signed by the server's CA, on top of its password, and REQUIRE SUBJECT names which one. See what the mysql client and .NET's MySql.Data do with it. Real output from MySQL 9.7.
5 min readHow to Require TLS for One MySQL Account
ALTER USER ... REQUIRE SSL makes one MySQL account refuse connections without TLS, and it includes local sockets. See what happens with each kind of connection, and how to undo it. Real output from MySQL 9.7.
4 min readHow to Make MySQL Refuse Unencrypted Connections
require_secure_transport makes MySQL refuse any connection without TLS, for every account, while still allowing local sockets. Turn it on with SET PERSIST, and test it from a client. Real output from MySQL 9.7.
4 min read