def crt_cmd(server, prog_name):

    """Function:  crt_cmd

    Description:  Create a basic MySQL program command line setup.  The basic
        setup will include program name, user login info, host, and port.
        The port is required to be set if MySQL instance is operating
        on a different port than 3306.

    Arguments:
        (input) server -> Server instance.
        (input) prog_name -> Name of Mysql binary program.
        (output) -> List containing a program command with arguments.

    """

    if server.extra_def_file:
        # Include defaults extra file option in command, but no auth.
        return [prog_name, "--defaults-extra-file=" + server.extra_def_file,
                "-u", server.sql_user, "-h", server.host, "-P",
                str(server.port)]

    # Command with auth.
    return [prog_name, "-u", server.sql_user, "-p" + server.sql_pass, "-h",
            server.host, "-P", str(server.port)]