Answer the question
In order to leave comments, you need to log in
Nodejs how to create tables in MySql from a dump?
Hello everyone, tell me how you can create tables from dmap in nodejs in MySQL
var mysql = require('mysql');
var connection = mysql.createConnection({
host : '192.168.0.10',
user : 'root',
password : 'pass',
database : 'dbase'
});
connection.query('CREATE TABLE TerStops (Stop_id int, Stop_name VARCHAR(100),' +
'Stop_lat VARCHAR(100),Stop_lon VARCHAR(100), PRIMARY KEY(Stop_id))',
function(err, result){
// Case there is an error during the creation
if(err) {
console.log(err);
} else {
console.log("Table Ter_Stops Created");
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question