• _program_name : The client name. 

• _thread : The client thread ID (Windows only). 

PHP defines attributes that depend on how it was compiled: 

•Compiled using libmysqlclient : The standard libmysqlclient  attributes, described previously. 

•Compiled using mysqlnd : Only the _client_name  attribute, with a value of mysqlnd . 

Many MySQL client programs set a program_name  attribute with a value equal to the client name. For example, mysqladmin  and mysqldump  set program_name  to mysqladmin  and mysqldump , respectively. MySQL Shell sets program_name  to mysqlsh . 

Some MySQL client programs define additional attributes: 

• mysql  (as of MySQL 8.0.17): 

• os_user : The name of the operating system user running the program. Available on Unix and Unix- like systems and Windows. 

• os_sudouser : The value of the SUDO_USER  environment variable. Available on Unix and Unix-like systems. 

## Connection Atrribute Limits 

mysql  connection attributes for which the value is empty are not sent. 

• mysqlbinlog : 

• _client_role : binary_log_listener 

•Replica connections: 

• program_name : mysqld 

• _client_role : binary_log_listener 

• _client_replication_channel_name : The channel name. 

• FEDERATED  storage engine connections: 

• program_name : mysqld 

• _client_role : federated_storage 

There are limits on the amount of connection attribute data transmitted from client to server: 

•A fixed limit imposed by the client prior to connect time. 

•A fixed limit imposed by the server at connect time. 

•A configurable limit imposed by the Performance Schema at connect time. 

For connections initiated using the C API, the libmysqlclient  library imposes a limit of 64KB on the aggregate size of connection attribute data on the client side: Calls to mysql_options()  that cause this limit to be exceeded produce a CR_INVALID_PARAMETER_NO  error. Other MySQL Connectors may impose their own client-side limits on how much connection attribute data can be transmitted to the server. 

