v.21.10Improvements

Introduce connection_wait_timeout setting for MySQL engine

Introduce connection_wait_timeout (default to 5 seconds, 0 - do not wait) setting for MySQL engine. #28474 (Azat Khuzhin).
Introduces the connection_wait_timeout setting for the MySQL table engine, allowing control over how long ClickHouse waits to establish a connection to a MySQL server.

Why it matters

This feature addresses connection latency or availability issues by letting users specify a timeout period (default 5 seconds) for connecting to a MySQL server. Setting it to 0 disables waiting. This helps avoid long hangs or delays when MySQL is slow to respond or temporarily unavailable.

How to use it

Configure the connection_wait_timeout setting when creating or altering a MySQL engine table, for example:

CREATE TABLE example (
...
) ENGINE = MySQL('host:port', 'database', 'table', 'user', 'password', 'connection_wait_timeout=3');


or include it in the table engine definition settings to specify the connection timeout in seconds.