Custom database error - "mysql is not a function"?

Hi @maxtor,

Changing the const connection = line should get you started. I update the template in my own tenant and got a connection error instead (expected, no actual mysql instance to connect to). If you replaced mysql with mysql.createConnection on that line, are you still getting the same error?

  const connection = mysql.createConnection({
    host: 'localhost',
    user: 'me',
    password: 'secret',
    database: 'mydb'
  });

1 Like