Preheat the oven to 350°F (175°C).
In a large bowl, combine the drained pineapple, cottage cheese, and cheddar cheese.
Add the sugar, beaten eggs, and flour to the mixture.
Stir in the coconut flakes and melted butter.
Add salt and vanilla extract to taste.
Mix all ingredients until well combined.
Pour the mixture into a greased 9x13-inch baking dish.
Bake in the preheated oven for 45 minutes or until golden brown.
Remove from the oven and let it cool for a few minutes.
Serve warm as a side dish or dessert.