Jami` at-Tirmidhi, Book 48, Hadith 230 (In-Book) ⓘ
Abu Hurairah, may Allah be pleased with him, narrated that the Messenger of Allah said: “O Allah, benefit me with that which You have taught me, and teach me that which will benefit me, and increase me in knowledge. All praise is due to Allah in every condition, and I seek refuge in Allah from the condition of the people of the Fire (Allāhummanfa`nī bimā `allamtanī wa `allimnī mā yanfa`unī, wa zidnī `ilma, al-ḥamdulillāhi `alā kulli ḥālin, wa a`ūdhu billāhi min ḥāli ahlin-nār).”
حَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، عَنْ مُوسَى بْنِ عُبَيْدَةَ، عَنْ مُحَمَّدِ بْنِ ثَابِتٍ، عَنْ أَبِي هُرَيْرَةَ، رضى الله عنه قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي وَعَلِّمْنِي مَا يَنْفَعُنِي وَزِدْنِي عِلْمًا الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ وَأَعُوذُ بِاللَّهِ مِنْ حَالِ أَهْلِ النَّارِ " . قَالَ هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ هَذَا الْوَجْهِ .
also referenced under: Hadith 3599 (Reference) & Volume 6, Book 46, Hadith 3599 (DarusSalam)