Sun will spend $800m to purchase all shares of the open source database firm, plus an additional $200m to cover "options".
The vendor plans to position MySQL with its other web application offerings and bundle the database software with its commercial products.
MySQL will be divided among Sun's Software, Sales and Service groups, and MySQL chief executive Martin Mickos will be given an executive position at Sun.
"MySQL's employees and culture, along with its near ubiquity across the web, make it an ideal fit with Sun's open approach to network innovation," said Sun president and chief executive Jonathan Schwartz.
"And most importantly, this announcement boosts our investments into the communities at the heart of innovation on the internet and of enterprises that rely on technology as a competitive weapon."
Charles King, principal analyst at Pund-IT, suggested that the acquisition could create friction between Sun's open source efforts and its proprietary software business.
The analyst added that Sun has endured criticism in the past for its reluctance to open its code.
"MySQL could create numerous commercial opportunities for Sun, and may strengthen Sun's credibility among open source adherents," King wrote.
"However, those same folks are likely to keep a very close watch on how the company manages MySQL."
Could be used for everything from search-and-rescue robots to wearable tech
Don't require the rare material being mined from the mountains of South America
IBM hopes that its new tool will avoid bias in artificial intelligence
Found by calculating the strength of the material deep inside the crust of neutron stars