mirror of
https://github.com/danbulant/sql2csv
synced 2026-06-19 22:41:46 +00:00
Connect to MySQL and set sql2cvs connection to it
This commit is contained in:
parent
c6d720b8d1
commit
2dc1ac0e7a
1 changed files with 12 additions and 0 deletions
12
index.js
12
index.js
|
|
@ -87,3 +87,15 @@ var con = mysql.createConnection({
|
||||||
user: config.username,
|
user: config.username,
|
||||||
password: config.password
|
password: config.password
|
||||||
});
|
});
|
||||||
|
|
||||||
|
con.connect(function(err) {
|
||||||
|
if (err){
|
||||||
|
console.log("\x1b[31m");
|
||||||
|
console.log(err + "");
|
||||||
|
console.log("\x1b[0m");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
log("MySQL Connected!");
|
||||||
|
});
|
||||||
|
|
||||||
|
s2c.setConnection(con);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue