/**
  * {@inheritDoc}
  *
  * @see net.sf.hajdbc.DumpRestoreSupport#createRestoreProcess(net.sf.hajdbc.ConnectionProperties,
  *     java.io.File)
  */
 @Override
 public ProcessBuilder createRestoreProcess(ConnectionProperties properties, File file) {
   return setPassword(
       new ProcessBuilder(
           "mysql",
           "-h",
           properties.getHost(),
           "-P",
           properties.getPort(),
           "-u",
           properties.getUser(),
           properties.getDatabase(),
           "<",
           file.getPath()),
       properties);
 }
  private static ProcessBuilder setPassword(
      ProcessBuilder builder, ConnectionProperties properties) {
    if (!PASSWORD_FILE.exists()) {
      builder.environment().put("MYSQL_PWD", properties.getPassword());
    }

    return builder;
  }