Added check for non-existent databases on mysql