/**
  * @param array $tables
  * @param       $mysqldump
  *
  * @return Symfony_Process_ProcessBuilder
  */
 protected function createProcessBuilder(array $tables, $mysqldump)
 {
     $processBuilder = Symfony_Process_ProcessBuilder::create()->setWorkingDirectory(untrailingslashit(ABSPATH))->setTimeout(3600)->setPrefix($mysqldump)->add('--force')->add('--user='******'--password='******'--add-drop-table');
     if ($this->options->isSkipLockTables()) {
         // Don't lock all tables for read.
         $processBuilder->add('--lock-tables=false');
     }
     if ($this->options->isSkipExtendedInsert()) {
         $processBuilder->add('--extended-insert=false');
     }
     $processBuilder->add($this->configuration->getDatabase());
     // Dump only specific tables
     foreach ($tables as $table) {
         $processBuilder->add($table);
     }
     if ($this->configuration->isSocket()) {
         $processBuilder->add('--socket=' . $this->configuration->getSocketPath());
     } else {
         $processBuilder->add('--host=' . $this->configuration->getHost());
         if (($port = $this->configuration->getPort()) !== null) {
             $processBuilder->add('--port=' . $port);
         }
     }
     return $processBuilder;
 }