Place grated coconut, cumin seeds, green chilies (if using) in the bowl of a food processor. Process until smooth. Set aside.
Place chopped pineapple, turmeric, red chilly powder and enough salt in a deep pan. Add enough water to cover pineapple. Cook until pineapple turns mushy. Stir in ground coconut mixture. Cook again for another 2-4 minutes. Add more water, if needed. When done, use a metal spoon or potato masher to lightly mash pineapples. Season with salt.
Remove from heat. Stir in yogurt. Set aside.
To make the tempered spices, heat oil in a frypan over medium-high heat. Add mustard seeds, and allow to pop. Add dried red chilies and curry leaves, and cook, stirring, for 2-3 minutes. Remove from heat.
Add tempered spices to pineapple pachadi. Stir well. Serve hot with rice.