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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -