node-query/node_modules/mysql2/load.js

6 lines
271 B
JavaScript

var mysql = require('./index.js');
var c = mysql.createConnection({user: 'root', debug: 1, database: 'test'});
//c.query('select 1+1 into outfile ?', [ process.stdout ], console.log);
c.query('LOAD DATA LOCAL INFILE "/tmp/ttt.csv" INTO TABLE insert_test', console.log);