After creating a simple connection and making sure it works (give it wrong info and it throws an error) I went ahead and tried to query but upon doing so, the server just hangs, no error.
Here is the snippet:
var db = mysql.createConnection({
host : config.host,
user : config.user,
password : config.password,
port : config.port,
database : config.database
});
db.connect();
db.query("SELECT 1", function(err, rows) {
console.log(rows);
});
Is there an error with the connection? How could I catch it if so?