Question

Cannot connect to mysql managed database via Nodejs

Posted November 20, 2020 953 views
MySQLNode.jsDigitalOceanDatabases

I followed the standard way i usually do on localhost:

const con = mysql.createConnection({
  user: "xxxx",
  host: "xxxx",
  password: "xxxxx",
  database: "database",
  port: "xxxx",
});

But I get the following error when using the digital ocean managed database: Error: ERNOTSUPPORTEDAUTHMODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client.

So far the only was to login to it is via terminal using the flags way of logging in.

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.

×
Submit an Answer
1 answer