Mysql.pm and DBD::mysql implement two different approaches to communicate with an mysql server. DBD::mysql is built upon the DBI, the generic Perl Database Interface. It brings you an identical interface to a broad variety of databases and is in this regard comparable to ODBC. The advantage of the DBI approach is portability and interoperability. Mysql.pm is the elder species. It was written before DBI was available but inspired by an early draft of the DBI specification. As has been been circulating longer it are more mature and pretty stable. It is also more complete than DBD::mysql.
Binary packages can be installed with the high-level tool pkgin (which can be installed with pkg_add) or pkg_add(1) (installed by default). The NetBSD packages collection is also designed to permit easy installation from source.
The pkg_admin audit command locates any installed package which has been mentioned in security advisories as having vulnerabilities.
Please note the vulnerabilities database might not be fully accurate, and not every bug is exploitable with every configuration.
Problem reports, updates or suggestions for this package should be reported with send-pr.