Refactoring mysql common recipe