Our Company wants to use MySQL for one software product. This product is not open-source. Is it legal to use it freely ?
If not, how about PostgreSQL ? Is this okay for our purpose ?
Postgres (not Postgre) is absolutely free. You can do anything you want with it.
For MySQL you will most probably need a commercial license if you plan to redistribute your application with a bundled database. Not sure if this is required if your application just needs MySQL but I think this also requires a commercial licenses because it is considered a derivative work
But I'm not a lawyer. So if you want to be 100% sure, talk to Oracle and a lawyer.
As licenses go, PostgreSQL's BSD license is about the most permissive license you can find short of just public domain code. You are free to use it in a closed source product and distribute it without having to pay royalties or provide the source code to your product. You don't own anybody anything and you don't have to pay lawyers to look at any edge cases. Take it, use it.
But aside from the legal considerations, technically PostgreSQL is, in my opinion, a far superior database, architecturally, performance-wise, and most importantly from a pure data integrity standpoint. Many people choose a database because it's easy. If your data doesn't mean much to you, so be it. But anyone who really takes their data seriously will tell you that PostgreSQL is hands down one of the finest databases there is. Forget that it's free. It's built like a Cummins diesel, you can just load it down and it will just keep going.
I've worked with many different relational databases over the last ten years. I spent years using MySQL, and still use it. I think MySQL is a perfectly fine RDBMS. But I've always felt like PostgreSQL is in a league all its own. There are so many things I can say about it, from its elegant and solid design to its incredible durability to its excellent documentation. PostgreSQL is the foundation of our company's CRM system, accounting system, reporting, website, DNS, large parts of our IT infrastructure. For six years it has run day and night, 24/7, powering all these systems without incident. It's just a work horse.
First of all, the amount of information you've just provided isn't enough to clearly understand what exacly you mean by "using MySQL for one software product".
Of course, you're free to use the MySQL Community Edition along with any proprietary, closed-source products you see fit. But as I understand, your company wants to integrate the database server into your application, hence the need to know about licencing issues.
In this case, PostgreSQL comes with a much more flexible licence. While MySQL Community Edition uses the adorable and respectable GPL (GNU Public Licence) which prohibits you from integrating it within a closed-source product, PostgreSQL comes with PostgreSQL Licence, which is also an open-source licence, but much like the BSD licence. Thus, it's much more permissive, especially for use along with a closed-source product. In fact, it's being used in some closed-source products as it is, like the underlying DB and DWH servers of Yahoo, etc.
Just to summarize and clarify: You are free to mix proprietary code with original PostgreSQL sources, and sell or distribute for free the resulting product in either open or closed source. So, I'm assuming that's the style of licence you're looking for.
That being said, I have no intention to start a flame war, but PostgreSQL is a much more capable and stable RDBMS, so it's a much better option for any critical, business oriented application.