builder/extra/tools/ruby-tpm/configure/commands/start_command.rb
def mysql(command)
    host = @config.getProperty(REPL_DBHOST)
    port = @config.getProperty(REPL_DBPORT)
    user = @config.getProperty(REPL_DBLOGIN)
    pw = @config.getProperty(REPL_DBPASSWORD)

    begin
      Timeout.timeout(5) {
        return cmd_result("mysql -u#{user} --password=\"#{pw}\" -h#{host} --port=#{port} -e \"#{command}\"")
      }
    rescue Timeout::Error
    rescue RemoteCommandNotAllowed
    rescue => e
    end

    return ""
  end
# Issue a MySQL command and return the output. 
Issue a MySQL command and return the output.
Issue a MySQL command and return the output .
def mysql(command)
    host = @config.getProperty(REPL_DBHOST)
    port = @config.getProperty(REPL_DBPORT)
    user = @config.getProperty(REPL_DBLOGIN)
    pw = @config.getProperty(REPL_DBPASSWORD)
    begin
      Timeout.timeout(5) {
        return cmd_result("mysql -u#{user} --password=\"#{pw}\" -h#{host} --port=#{port} -e \"#{command}\"")
      }
    rescue Timeout::Error
    rescue RemoteCommandNotAllowed
    rescue => e
    end
    return ""
  end
def mysql ( command ) host = @config . getProperty ( REPL_DBHOST ) port = @config . getProperty ( REPL_DBPORT ) user = @config . getProperty ( REPL_DBLOGIN ) pw = @config . getProperty ( REPL_DBPASSWORD ) begin Timeout . timeout ( 5 ) { return cmd_result ( "mysql -u#{user} --password=\"#{pw}\" -h#{host} --port=#{port} -e \"#{command}\"" ) } rescue Timeout :: Error rescue RemoteCommandNotAllowed rescue => e end return "" end
Issue a MySQL command and return the output.
Issue a MySQL command and return the output .
command