Make Database component tests work without a MW setup and without MySQL

Change-Id: I43ad38c86970dde6c87da1be88c666f0e3649865
Merge "Make Database component tests work without a MW setup and without MySQL"