According to the announcement, around $US800 million cash will be paid in exchange for MySQL stock and some $US200 million in options will be taken on by Sun.
Millions of websites are built using the LAMP stack - and MySQL is the M in that acronym, with the others being Linux, Apache and PHP/Perl.
MySQL chief executive Marten Mickos will join the Sun executive leadership team after the deal is finalised.
The move will bring Sun up against Oracle, the world's largest database company, but will certainly improve Sun's standing with the open source community.
The idea of buying an open source database has been floating around at Sun for some time; nearly three years ago, then chief executive Scott McNealy was reported by News.com as raising the idea during a meeting of financial analysts.
The same report also said that Jonathan Schwartz, then president, and the current chief executive, told an interviewer that Sun was looking at database software as one way of extending its footprint into the open source realm.
Sun already supports the other well-known open source database, PostgreSQL on its Solaris operating system. And many companies run Oracle on Solaris.
This means that every big IT company has a major open source offering - Microsoft is the only odd man out.
In his blog, Schwartz wrote : "Until now, no platform vendor has assembled all the core elements of a completely open source operating system for the internet. No company has been able to deliver a comprehensive alternative to the leading proprietary OS.
"With this acquisition, we will have done just that - positioned Sun at the center (sic) of the web, as the definitive provider of high performance platforms for the web economy."
RECRUITMENT & RETENTION REPORT 2013HIRE OR FIRE? BUY OR BUILD
2013 is well underway and Australian companies need to know whether they should invest in IT skills training or pay a premium for the people they need.
If you want to know which choices are being made in your sector, what skills are hard to find, which sectors intend to hire or fire and where the IT spend is going, this free report is must have.
A professional journalist with decades of experience, Sam for nine years used DOS and then Windows, which led him to start experimenting with GNU/Linux in 1998. Since then he has written widely about the use of both free and open source software, and the people behind the code. His personal blog is titled Irregular Expression.