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

javascript - Backbone pushState routes -

runtime error - Cannot find an overload for op_subtraction when subtracting datetime from datetime in powershell -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -