You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to setup a mysql connection within a grunt task. However, I'm struggling badly and I can't see why.
I'm trying to set it up like this:
var mysql = require('mysql');
var connection = mysql.createConnection({
host : grunt.config('db.settings.host'),
user : grunt.config('db.settings.user'),
password : grunt.config('db.settings.password'),
port : '8889',
debug: true
});
connection.connect(function(err) {
if (err) {
grunt.log.write('error connecting: ' + err.stack);
return;
}
grunt.log.write('connected as id ' + connection.threadId);
});
However, it never hits the connect callback. I debugged trough the modules code and figured, that the "handshake" never get's hit. I'm obviously doing something massively wrong, but I can't see the mistake while comparing it to the examples.
Any help? :)
Cheers!
The text was updated successfully, but these errors were encountered:
Hey folks,
I'm currently trying to setup a mysql connection within a grunt task. However, I'm struggling badly and I can't see why.
I'm trying to set it up like this:
However, it never hits the connect callback. I debugged trough the modules code and figured, that the "handshake" never get's hit. I'm obviously doing something massively wrong, but I can't see the mistake while comparing it to the examples.
Any help? :)
Cheers!
The text was updated successfully, but these errors were encountered: