I am trying to capture connection error on nodejs while using mysql or mysql2 node module. My code is
console.log("Connecting to database") try{