Allahummaf-taḥ li abwaba raḥmatik. Allahumma inni as’aluka min faḍlik.

Dua for Entering the Mosque
Dua in Arabic:- اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ
Transliteration:- Allāhummaf-taḥ lī abwāba raḥmatik
Translation:- O Allah, open the doors of Your mercy for me.
Dua for Exiting the Mosque
Dua in Arabic:- اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ
Transliteration:- O Allah, I ask You for Your bounty
Translation:- O Allah, open the doors of Your mercy for me.