title: Error: read ECONNRESET when inserting data into table
body: <p>I followed this tutorial (<a href="http://www.mysqltutorial.org/mysql-nodejs/insert/" rel="nofollow noreferrer">Tutorial Insert multiple rows at a time</a>) to insert multiple rows data into a MySQL table (chapter 'Insert multiple rows at a time').</p>
  
  <p>I did the same with my code but I got an ECONNRESET error instead of my connection if good enough with the database.</p>
  
  <p>The error details below:</p>
  
  <pre><code>{ Error: read ECONNRESET
      at _errnoException (util.js:1022:11)
      at TCP.onread (net.js:628:25)
      --------------------
      at Protocol._enqueue (C:\Users\frederic.fayet\Desktop\DEV\NodeJS\TER_V1 - Reprise après pause\node_modules\mysql\lib\protocol\Protocol.js:144:48)
      at Connection.query (C:\Users\frederic.fayet\Desktop\DEV\NodeJS\TER_V1 - Reprise après pause\node_modules\mysql\lib\Connection.js:200:25)
      at C:\Users\frederic.fayet\Desktop\DEV\NodeJS\TER_V1 - Reprise après pause\app.js:340:24
      at handlePromises (C:\Users\frederic.fayet\Desktop\DEV\NodeJS\TER_V1 - Reprise après pause\app.js:242:9)
      at promise.then (C:\Users\frederic.fayet\Desktop\DEV\NodeJS\TER_V1 - Reprise après pause\app.js:251:20)
      at &lt;anonymous&gt;
      at process._tickCallback (internal/process/next_tick.js:188:7)
    code: 'ECONNRESET',
    errno: 'ECONNRESET',
    syscall: 'read',
    fatal: true }
  </code></pre>
  
  <p>My code is below for querying the database:</p>
  
  <pre><code>db.query(sqlSchedules, [sqlDataSchedules], function (err, result) {
                          if (err) {
                              console.log(err);
                              return; //throw err;
                          }
                          //Get the number of inserted lines:
                          nbLinesSchedulesInserted = result.affectedRows;
                          console.log("Nombre d'éléments insérés : " + result.affectedRows);
                      });
  </code></pre>
  
  <p>And the database connection is:</p>
  
  <pre><code>db.connect(function(err) {
          if (err) console.error('Error occured during the DB connection.'); 
          console.log("DB connection: OK"); 
      });
  </code></pre>
  
  <p>The sqlDataSchedules is an array that looks like:</p>
  
  <pre><code>[ [ '848633',
      'Amiens',
      '162700',
      '162700',
      '20190509',
      '20190702',
      2019-05-31T07:27:09.710Z ],
    [ '848633',
      'Villers-Bretonneux',
      '163800',
      '163900',
      '20190509',
      '20190702',
      2019-05-31T07:27:09.710Z ],
    [ '849401',
      'St Quentin',
      '074500',
      '074500',
      '20190527',
      '20190528',
      2019-05-31T07:27:09.711Z ],
    ... 141377 more items ]
  </code></pre>
  
  <p>And the SQL request is:</p>
  
  <pre><code>INSERT INTO schedules (trainNumber, stopName, baseArrivalTime, baseDepartureTime, beginDate, endDate, updatedOn) VALUES ?
  </code></pre>