in reply to Databas connection issue

Take a look at MySQL::Sandbox.