Add config option to run arbitrary SQL commands after connecting to a MySQLi database, closes #755 and refs #570 (also see 5d637f02835da6cede3ca335f4031089c0132b62)