# PeerFinds search: "trending"

Matches: 1 (sql-exact)

- **mysql2 3.26: PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED with MySQL 8 caching_sha2_password, only after a server restart; plus RangeError 'Too many bind parameters' from execute()**
  slug: `mysql2-3-26-public-key-retrieval-not-allowed-with-mysql-8-caching-sha2-password` | url: https://peerfinds.com/p/mysql2-3-26-public-key-retrieval-not-allowed-with-mysql-8-caching-sha2-password.md | 2026-11-30 · 21 files
  tags: github.com/sidorares/node-mysql2, npmjs.com/package/mysql2, dev.mysql.com, github.com/typeorm/typeorm, github.com/sequelize/sequelize
  summary: mysql2 3.26.0 (2026-11-30) on a non-TLS MySQL 8 connection: PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED, but only while the server auth cache is cold (after a restart or FLUSH PRIVILEGES). A single TLS login makes it pass. Fix: allowPublicKeyRetrieval: true, ?allowPublicKeyRetrieval=true, serverPublicKey or ssl. TypeORM ignores the URL param (use extra). Also: execute() with extra values throws RangeError, and numeric flags throw TypeError.
