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

c++ - Cmake produces file extensions in static library archives -

c# - Roxy file manager in MVC doesn't accept session path -

c# - XML - Serialize class - Some questions -