aboutsummaryrefslogtreecommitdiff
path: root/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.md
blob: 8560e2652c67c75c7d74fc191e0c38f4f13e1bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
##

https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/

```js
const mysql = require('mysql');
mysql.createConnection({
  authPlugins: {
    caching_sha2_password: mysql.authPlugins.caching_sha2_password({
      onServerPublikKey: function(key) {
        console.log(key);
      },
      serverPublicKey: 'xxxyyy',
      overrideIsSecure: true //
    })
  }
});
```