Split resources as a functions and add check reference node mysql service start.