ldapsearch(1) -LLL -Y EXTERNAL -H ldapi:/// -b cn=config olcDatabase=mdb
LDAP search tool
-L     Search results are display in LDAP Data Interchange Format  detailed  in  ldif(5).   A  single  -L
       restricts the output to LDIFv1.
        A second -L disables comments.  A third -L disables printing of the LDIF version.  The default is
       to use an extended version of LDIF.
-Y mech
       Specify  the SASL mechanism to be used for authentication. If it's not specified, the program will
       choose the best mechanism the server knows.
-H ldapuri
       Specify  URI(s)  referring to the ldap server(s); a list of URI, separated by whitespace or commas
       is expected; only the protocol/host/port fields are allowed.  As an exception, if no host/port  is
       specified,  but  a  DN  is,  the DN is used to look up the corresponding host(s) using the DNS SRV
       records, according to RFC 2782.  The DN must be a non-empty sequence of AVAs whose attribute  type
       is "dc" (domain component), and must be escaped according to RFC 2396.
-b searchbase
       Use searchbase as the starting point for the search instead of the default.
source manpages: ldapsearch