First, execute make; this should compile without any warnings or errors whatsoever.
There are several features which are version dependent, such as NDB support and
certain SNMP traps.

NOTE - There are several open issues within MySQL 4.1 and 5.x that might
apply to you:
- Missing include files for mysql/ndb/mgmapi. It seems that at least
  ndb_global.h and ndb_net.h are not installed in mysql/ndb when
  executing 'make install'. See ndb/include/Makefile.am in the
  source tree for 4.1. Unfortunately, mysql/ndb/ndb_types.h, which
  is included by mysql/ndb/mgmapi/mgmapi.h #includes ndb_global.h,
  which will cause compiles to fail.
+ The solution is copying both from the sourcetree (ndb/include)
  into INSTALLPATH/mysql/ndb

- mysql/ndb/mgmapi/mgmapi.h defines 2 const values, namely const
  struct Ndb_Mgm_Error_Msg ndb_mgm_error_msgs[] and const int
  ndb_mgm_noOfErrorMsgs. If mgmapi.h is included in 2 or more
  sourcefiles in a project, it will cause the link stage to fail
  with a multiple definition error
+ This issue has been solved in the Makefile by specifying -zmuldefs
  at linkstage

- In mysql/ndb/mgmapi/mgmapi.h ndb_mgm_event_category and
  ndb_mgm_clusterlog_level are two enums. However; strict C checking
  does not allow for these types to be used without the 'enum'
  keyword prepended. A workaround is typedef-ing both to 'int' prior
  to including the mgmapi.h 
+ This issue has been solved in engines_ndbcuster.h for MySQL version
  4.x and 5.x

- In mysql/ndb/mgmapi/mgmapi.h ndb_mgm_event_severity is an enum.
  However; strict C checking does not allow for this type to be used
  without the 'enum' keyword prepended. A workaround is typedef-ing 
  it to 'int' prior to including the mgmapi.h 
+ This issue has been solved in engines_ndbcuster.h for MySQL version
  5.x

- mysql_fetch_fields( ) / mysql_list_fields( ) does not return a
  MYSQL_TYPE_SET or MYSQL_TYPE_ENUM in the MYSQL_FIELD structure for
  ENUM or SET columns; these are returned as MYSQL_TYPE_STRING (at
  least in MySQL 4.1)
+ This issue has been solved in dbtable.c in a way that should not
  affect other versions correctly supporting this

Next, copy the MYSQL-DB-MIB.mib into the mibs directory (/usr/share/snmp/mibs) of your Net-SNMP installation. Alternatively, export a variable called 'MIBS' as follows:
export MIBS="+<path to>/MYSQL-DB-MIB.mib"

From the top of my head, add to your snmp configuration (/etc/snmp/snmpd.conf);
master		on
agentxperms	0600	0755	0	0
AgentXTimeout	60

The MySQL user you wish to use for the agent should have privileges to execute;
SHOW PROCESSLIST
SHOW TABLE STATUS (for all tables and databases)
SHOW VARIABLES
SHOW STATUS

After this, executing 'mysql_agent' should daemonize the agent and fire up SNMP support. Any messages should be sent to syslog( ). I'll add more of these as I finish up the code. If it should be sent to the MySQL err log instead, are there generic functions available? (I have not located these yet).

After this;
snmpwalk -v 2c -c public localhost MySQL

should show the entire tree, providing that you exported this as a 'public' community with at least read-only access.

The OID for the MySQL tree is;
.1.3.6.1.4.1.24993

There are 3 tables in the agent implementation;
.1.3.6.1.4.1.24993.3, or myProcess	-	The processlist
.1.3.6.1.4.1.24993.5, or myDBTable	-	The list of databases/tables
.1.3.6.1.4.1.24993.4.3 or ndbNodeTable	-	The NDB cluster status

Mind that the NDB node table is only available if a proper connection to the cluster is established.

To look at a table in table format;
snmptable -v 2c -c public localhost myProcess
snmptable -v 2c -c public localhost myDBTable
snmptable -v 2c -c public localhost ndbNodeTable

Configuration is read from /etc/my.cnf, specifically the mysql_agent and client sections.
