title: NodeJs creating table in mysql DB
body: <p>Im trying to create a table called product in my DB, but I keep getting an error that says module not found. Can anyone help me? My code is below</p>
  
  <pre><code>// include mysql module
  var mysql = require('mysql');
  
  //MySQL DB Connection 
  var connection = mysql.createConnection({
      host     : 'localhost',
      user     : 'root',
      password : 'password',
      database: 'jordanRack'
    });
  
    connection.connect(function(err) {
      if (err) throw err;
      console.log("Connection Succeeded!")
  
      // create product table
    var sql = "CREATE TABLE product (prod_id INT PRIMARY KEY AUTO_INCREMENT, imagePath VARCHAR(100) NOT NULL, prod_title VARCHAR(100) NOT NULL, price INT NOT NULL, size INT NOT NULL)";
  
    // if query goes through
    connection.query( sql, function (err, result) {
          if (err) throw err;
          console.log("Table created");
    });
    });
  </code></pre>