Error 2060 is raised when the MySQL client library detects that the same connection attribute name is supplied more than once in mysql_options4(), blocking connection initialization.
MySQL Error 2060: CR_DUPLICATE_CONNECTION_ATTR occurs when the same connection attribute key is passed twice to mysql_options4(). Remove or rename the duplicate key, recompile, and reconnect to resolve the issue.
There is an attribute with the same name already A duplicate connection attribute name was specified for mysql_options4().
MySQL throws Error 2060 (CR_DUPLICATE_CONNECTION_ATTR) before a session is created. The client library scans the attribute list sent to mysql_options4()
. If two keys match exactly, the call fails and the connection sequence is aborted.
Because the failure happens on the client side, the server error log shows nothing.
The calling application must correct the input; otherwise every subsequent attempt that repeats the duplicate key will return the same error.
The error surfaces in MySQL 5.6.13 and later, whenever applications or drivers use connection attributes.
Typical contexts include C or C++ programs that call mysql_options4()
, modern connectors that forward extra metadata, and ORMs that auto-attach diagnostics.
Developers often first encounter the error after upgrading a MySQL client library or enabling extra connection attributes for observability or tracing.
Until the duplicate key is removed, no client connection can be established. Application threads will hang or exit with a fatal error, causing downtime for any feature that depends on the database.
Quickly identifying and eliminating the redundant key restores service and prevents cascading failures.
.
No. It is generated by the client library before any network traffic reaches MySQL.
The check is hard-coded for safety. Always resolve the duplication instead of bypassing it.
Connectors written in C, C++, or languages that bind to libmysqlclient (PHP, Perl DBD::mysql, Ruby mysql2) can invoke the function.
No. The root cause is in the client call. Upgrading the server alone will not remove duplicate keys.