Guest User

Untitled

a guest
Sep 4th, 2018
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. const mysql = require("mysql");
  2.  
  3. var con = mysql.createConnection({
  4. host: "localhost",
  5. user: "root",
  6. password: "root",
  7. database: "test"
  8. });
  9.  
  10. con.connect(err => {
  11. if(err) throw err;
  12. console.log("Connected To Database!");
  13. con.query("SHOW TABLES", console.log);
  14.  
  15. });
Add Comment
Please, Sign In to add comment