Ubable to connect to remote MySQL via db-mysql (node.js)

I wrote a small node.js code to try and insert stuff to my remote MySQL server but I keep getting the following error:

CONNECTION error: Can't connect to MySQL server on '**********.com' (60)

I tried writing a PHP script for the same and it worked for the same hostname and database. Am I missing something? Here is my node.js code:

var mysql = require('db-mysql');
new mysql.Database({
    hostname: '*********.com',
    user: '**********',
    password: '*********',
    database: '**********'
}).connect(function(error) {
    if (error) {
        return console.log('CONNECTION error: ' + error);
    }
    this.query().
        insert('MainUserDatabase',
            ['email', 'password', 'first_name', 'last_name'],
            ['xyzh@gmail.com', 'password', 'Oeem', 'Stosh']
        ).
        execute(function(error, result) {
                if (error) {
                        console.log('ERROR: ' + error);
                        return;
                }
                console.log('GENERATED id: ' + result.id);
        });
});