Add docs (factory mysqldb) plus tests