function checkMYSQL()
{
    var mysql = require('mysql')
    var connection = mysql.createConnection({
    host: "------",
    user: "-----", //
    password: "-----", //
    database: "-----",
    })
    var resultsss = connection.connect((err) => {
        if (err) {
          console.log(err)
          return
        }
        console.log('Database connected')
      })
    return 1;
}
okay so I've got this function to connect to a remote mysql database however it just skips and doesn't output anything (doesn't reach console.log(err) or ('Database connected')
this is the connection variable when debugging and results is undefined
I would really appreciate any help possible, thank you.