Hi,

I can connect to my DO managed DB via SQL workbench without issue. However, when I try and connect via my local lambda Node JS code, I receive the following error....

An Error… { Error: ERNOTSUPPORTEDAUTHMODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
code: ‘ERNOTSUPPORTEDAUTHMODE’,
errno: 1251,
sqlMessage:
'Client does not support authentication protocol requested by server; consider upgrading MySQL client’,
sqlState: '08004’,
fatal: true }

… my mysql looks like so…

   mysql.createConnection({
        host     : removed_for_post,
        user     : process.env["DO_u"],
        password : process.env["DO_p"],
        port     : '25060',
        database : 'defaultdb',
        ssl_mode: 'REQUIRED',
        ssl  : {
            ca : fs.readFileSync('./ca-certificate.txt')
          }

.. and I have updated to latest mysql library. I’ve also tried connecting without the ssl_mode and ssl options, same error message.

Any ideas?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer
Submit an Answer