HANDSHAKE_SSL_ERROR : self signed certificate in certificate chain

In a login page I have pointing to a managed MySQL database hosted in Digital Ocean, I get the following message in Chrome’s dev tools:

Error: self signed certificate in certificate chain at TLSSocket.<anonymous> (/opt/node_app/node_modules/mysql2/lib/connection.js:342:54) at TLSSocket.emit (events.js:315:20) at TLSSocket._finishInit (_tls_wrap.js:932:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)

I think I have the certificates correctly. Please advise what I may be doing wrong.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

Do you have the path to the CA certificate specified in your MySQL connection string? Also, could you share the connection string details that you are using here? Make sure to remove any sensitive information from there before sharing it here.

Regards, Bobby