Sun will pay $1 billion for Swedish software company MySQL, whose open-source database is used for some of the most widely visited Web sites in the world.
Sun said the deal will augment its position in the enterprise IT market, including the $15 billion database market.
Sun said MySQL's product line will help it give further support to the open-source Web application platform known as LAMP, the acronym for the Linux OS, Apache Web server, MySQL database and the PHP/Perl programming languages.
MySQL's strength in software-as-a-service offerings -- where applications are delivered over the Internet through a Web browser -- are also a plus, Sun said.
Databases are crucial for Internet-based applications in sites offering a range of services, from e-commerce to social networking.
Sun will pay $800 million in cash and $200 million in options, and the deal is expected to close by the end of Sun's 2008 fiscal year, which will end June 30.
Sun's acquisition ends speculation that MySQL might become a public company.
MySQL has become a formidable competitor to other relational database management systems from companies such as Oracle and IBM. The database itself is free for people to download, and MySQL makes money by offering subscription support packages.
MySQL CEO Marten Mickos -- whose business cards list him as "Open Sourcerer"-- will join Sun's executive team. MySQL will be folded into Sun's Software, Sales and Service organizations.
Sun said it plans to create a joint team to integrate MySQL, which has 400 employees in 25 countries, into its operations.
Sun said MySQL will gain new distribution through companies such as Intel, IBM and Dell via existing relationships Sun has with those vendors.
Sun also said it will also work on optimizing the LAMP stack to run on GNU/Linux, Microsoft's Windows OS and its OpenSolaris OS.
Sun is in need of a database management system, one analyst said. It's choice of MySQL "makes sense with Sun's open-source orientation," said James Kobielus, senior analyst with Forrester Research.
(Peter Sayer in Paris contributed to this story).