MySQL always was primarily developed by an commercial entity. And always gave an license out under GPL (i believe very first used some other license as GPL wasn't known back then ...) Oracle took over the development team (lots of pre-acquisition staff included) and legal rights to all of that.
(Disclaimer: I started at independent MySQL AB more than ten years ago and now wear an Oracle badge, after wearing Sun for a while)