There seems to be this volley of excuses, but the excuses on both ends pose a plot hole.
If Mickey knew about the whole name connection for Xehanort but thought that he wasn't a threat, that still doesn't justify the fact that he forgot his name ten years later, because it would be just as easy to say that he would forget MX's name. And, you know, still assuming he isn't an idiot (and he's not), that wouldn't happen.
Ok. In KH2, Mickey clearly identifies the fact that he has known Xehanort's Heartless was a fake and was actually once the apprentice of Ansem the Wise, right? So he spent his time in KH trying to stop this impostor, yes? And yet allllllll of this time passes by (well over a year) and it takes him THAT long to realize that the apprentices name is Xehanort?
So let's get this straight so people can realize how idiotic that sounds. Mickey battles against MX in some way in BbS, and MX somehow disappears. Mickey later finds that a man with the same name exists as the apprentice of Ansem. He is highly concerned (obviously knowing this isn't a coincidence since names are distinctly unique in KH), but after further investigation he (somewhat foolishly) decides that Xehanort isn't a threat. Then years later he finds out that a bunch of shit that has been going on is caused by the heartless of the very man who has the same name as that villain he battled. And he can't remember? He can't even remember for over a year? If he can't remember the name "Xehanort" for the apprentice, he CANNOT remember the name "Xehanort" for the master, otherwise, if he DID remember the name for MX, he would know it was Xehanort. But he didn't. Meaning that the name "Xehanort" wasn't important to him, meaning that he forgot about MX in some way.
I think that right now, we can't call it a plot hole because we don't know the full extent of Mickey's role in the game. We know that he's training under Yen Sid, that he helps Ven at one point, and he shows up for the giant battle at the very end. For all we know, Mickey never heard Master Xehanort's name, or at least didn't come into contact with him very much. I'll admit that's a slim possibility, but I think it's still there. And nobody else seemed too worried about Ansem having an apprentice with the same name as MX.