It's straightforward with a perl script using Net::Ldap and DBI. Even
easier, just output the SQL statements to insert from a script. See the
online documentation for each command, pseudo code is:
$mesg = search ldap for entries
while ($entry = $mesg->pop_entry()) {
$field1 = $entry->get_value('field1');
...
print "INSERT INTO table1 (field1,field2...) VALUES
('$field1','$field2'...);\n";
}
But the question is...why? LDAP is a perfectly reasonable way to store
and report on directory data.
Muhammad Azam Akram wrote:
> Hi
> I want to pick entries from ldap and insert them in
> mysql database.
> can anybody guide me, how should i do it.
>
> Thank you
>