Abu Umamah reported: The Prophet, peace and blessings be upon him, said, “Whoever leaves for the mosque in the morning for no reason but to learn goodness or teach others, then he will have a reward as if he has completed the Hajj pilgrimage.”
Source: al-Mu’jam al-Kabīr 7346
Grade: Sahih (authentic) according to Al-Mundhiri
عَنْ أَبِي أُمَامَةَ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ مَنْ غَدَا إِلَى الْمَسْجِدِ لا يُرِيدُ إِلا أَنْ يَتَعَلَّمَ خَيْرًا أَوْ يَعْلَمَهُ كَانَ لَهُ كَأَجْرِ حَاجٍّ تَامًّا حَجَّتهُ
7346 المعجم الكبير للطبراني باب الصاد من اسمه الصعب
1/84 المحدث المنذري خلاصة حكم المحدث إسناده لا بأس به في الترغيب والترهيب
Source: Daily Hadith