javascript - unable to connect to database in nodejs? -


I am reading and trying to connect to mysql database using node js. Here is my program

  var mysql = require ('mysql'); Var connection = mysql.createConnection ({host: "localhost", user: "root", password: ""}}}); Connection.connect (); Connection.query ("Use the Exam"); Var strQuery = "select from chat"; Connectionkquery (Strccri, function (fault lines) {if (err) {throw Gden;} else {console.log (rows);}}) connection.destroy ();  

I do not have an error, but no one is able to achieve output

wait for the program to execute your queries to

  connection.destroy (for);  

with

  connection.end ();  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -