The Messenger of Allah ﷺ said, "I had forbidden you from visiting graves, but now visit them, for in them is a lesson. I had forbidden you from nabidh, so drink it, but I do not permit any intoxicant. And I had forbidden you from storing the meat of sacrificial animals, so eat from it."
حدثنا يحيى بن آدم حدثنا ابن مبارك عن أسامة عن محمد بن يحيى بن حبان عن عمه
قال رسول الله ﷺ إني نهيتكم عن زيارة القبور فزوروها فإن فيها عبرة ونهيتكم عن النبيذ فاشربوا ولا أحل مسكرا ونهيتكم عن الأضاحي فكلوا
Its isnad is sahih. Ibn Mubarak is Abdullah, and Usamah is Ibn Zayd bin Aslam, and Muhammad bin Yahya bin Hibban is trustworthy, and his paternal uncle Wasi bin Habban is also trustworthy. Muslim narrated the hadith 2/672 no. 977, in the book of funerals, and Abu Dawud 3/322 no. 3698, in the book of drinks, in the chapter on vessels, and Nasai 4/89 no. 2033.