code: function CreateConnection (gammu, opts) {
  
      gammu.Debug (3, "MySQL creating connection [%s]", gammu.uid);
      gammu.base = mysql.createConnection(opts);
  
      // register event for asynchronous server errors
      gammu.base.on('error', function(err) {
          gammu.Debug (1, "MySQL server error=[%s]", err);
  
          // Sever was restarted or network connection was lost let restart connection
          if(err.code === 'PROTOCOL_CONNECTION_LOST') {
              gammu.Debug.call (gammu, 4, "MySQL connection lost [%s/%d] automatic connect retry in 10s]", gammu.uid);
              setTimeout(function () {CreateConnection (gammu,opts);}, MYSQL_RECONNECT_TIMER);
          } else {
              throw err;  // server variable configures this)
          }
      });
  
      // force an initial connectiion at object construction time
      gammu.base.connect (function(err) {
          if (err) {
              gammu.Debug.call (gammu, 1, "MySQL connection fail [%s] automatic connect retry in 10s]", err);
              setTimeout(function () {CreateConnection (gammu,opts);}, MYSQL_RECONNECT_TIMER);
  
          } else {
              gammu.Debug.call (gammu, 5,"MySQL Connect Done [%s]",  gammu.uid);
          }
      });
  }
docs: 10s timeout in bewteen two MYSQL reconnects ConnectDB is done on at creation time and asynchronously on PROTOCOL_CONNECTION_LOST