Hi Charlie, could you please add some exception handling to the connect() function? It's best to catch these common ones:

Errno::ECONNREFUSED
RbMysql::ClientError
Errno::ETIMEDOUT
RbMysql::AccessDeniedError

An example can be found here:
https://github.com/rapid7/metasploit-framework/pull/1260/files

As you can see, we never did any exception handling for mysql_login() so that's kinda bad.