MySQL 8.4.2
Source Code Documentation
|
Topics in this section:
The following list describes some of the terms introduced in this section:
A default connection supports:
A session owns state like:
A session is used by the server and the protocol to manage state.
Sessions are:
Closing a session releases all session related data.
After a client connects to the server it:
In the Negotiation step the client checks which features the server supports on the protocol side.
After a successful finish of the Authentication step the previous Session is discarded and a new Session is created.
Further Command Messages run within a Session.
Authentication supports several authentication mechanisms that can be discovered with Mysqlx::Connection::CapabilitiesGet.
authentication.mechanisms
Server-side supported SASL mechanism:
["MYSQL41", "SHA256_MEMORY"]
["PLAIN", "SHA256_MEMORY", "MYSQL41"]
Required mechanisms:
Other known mechanisms:
The messages may be pipelined:
For the server it is no difference if the messages from client where sent in a bulk or if the client waited. The network and send/receive buffers of the Operation System will act as queue.
Expectations help to control the behavior of following messages if a pipelined message fails.
If the result of Mysqlx::Connection::CapabilitiesGet contains a extension key from the table below it supports the feature.
Name | Extension | Read/Write | Version |
---|---|---|---|
tls | TLS | RW | 5.7 |
authentication.mechanisms | Authentication mechanisms | R | 5.7 |
doc.formats | Doc formats | R | 5.7 |
client.interactive | Client interactive | RW | 8.0 |
compression | Compression | RW | 8.0.18 |
node_type | Node type | R | 5.7 |
client.pwd_expire_ok | Client pwd expire ok | RW | 5.7 |
CapabilitiesGet()
and documented.The client may assume that the server supports a set of features by default and skip the Mysqlx::Connection::CapabilitiesGet step:
Mysqlx::Connection::CapabilitiesGet
0
: supported, not in use1
: supported, in useMysqlx::Connection::CapabilitiesSet
1
: switch to TLS connection after server-side OkIf the server doesn't support the capability, then it will return an error.
This capability return a list that informs the client, which authentication mechanism may be used while authentication (AuthenticationStart message).
PLAIN
is going to be visiable after SSL actication or on SECURE channel:This extension informs how document are encoded by the server. Currently documents are in text format, still in future it could be changed to some binary encoding and user might be able to change the format.
This extension changes, which timeout-values are used by the server when its waiting for first byte of a new request. Its enabled by setting client.interactive
capability to true
, it changes the default of mysqlx_wait_timeout
variable, which is going to be initialized from mysqlx_interactive_timeout
variable.
mysql
or mysqlsh
. In such case the admin of an server might consider to extend the timeout values, and shorten for scripts that do SQL batch execution.This extension informs what compression algorithms are permitted for use on X Protocol connections. Currently, the Deflate, LZ4, and zstd algorithms are supported and permitted by default. To disallow any of the algorithms, the user can set mysqlx_compression_algorithms
variable to include only the ones permitted.
This is rather an information to what network node the client connected. Currently the capability transfers "mysql" value, which points to MySQL Server, still intermediate network elements like MySQL Router might consider changing this value to "router".
This extension changes, behavior on server side, where authentication fails when expired MySQL Server account is used. Setting client.interactive
capability to true
waiting for first byte of a new request. Its enabled by setting client.pwd_expire_oke
capability to true
, makes the authentication pass which allows user to change the password.