X DevAPI User Guide for MySQL Shell in Python Mode

2.2.3 Connection Attributes

Connection attributes are key-value pairs that application programs can pass to the server during connection time to be stored in the PERFORMANCE_SCHEMA tables session_account_connect_attrs and session_connect_attrs. There are two different kinds of connection attributes:

X DevAPI supports MySQL connection attributes through the connection parameter connection-attributes (xdevapi.connection-attributes for Connector/J), set through the getSession() and getClient() methods. Here are the different ways to use the parameter:

The following is a generic example of a connection string that configures the connection attributes:

mysqlx://user:password@localhost:33060?connection-attributes=[key1=value1,key2=value2,key3=]