Classified information in the US, like most anywhere else, is distributed on a need-to-know basis: unless someone's duty requires them to know something, they can't access it, however high their security clearance.
The POTUS is a special case, because secrecy in the US is established not by law, as it is in most countries, but by several executive orders. EO's are sole purview of the President, which means that the President is the final authority on what is classified and can at will cancel the entire order. This isn't theoretical: not long ago, Obama had exercised this exact power, replacing older EOs with Executive Order 13526.
Under this order, the President and even a former President has privileges per Section 4.4(a) to bypass the need-to-know rule, but there is a limitation in 4.4(b) on whether such access is in the interest of national security. As any officer making that determination answers to the executive, they can be replaced or overruled through the chain of command.
While the POTUS can't just casually browse the X-files, the system runs on their orders, and there's no mechanism to restrict classified information from them. The Independence Day scenario, where major research was hidden from the President, could be resolved by firing the officer or issuing a new EO. It's very unlikely, except maybe in the Designated Survivor scenario, where the office is temporarily assumed by someone low in the line of succession.
Personal and business privacy is less easily violated - the laws protecting it come from the legislative branch and require the Congress or a court to legally bypass. Obtaining private records generally requires a court warrant, so it's clear that Donald can't casually demand a passer-by to unlock their phone.
What happens to private information in government databases is patchier; health records generally have the strongest protections. Most protections have weakened since 2001, when the national security justification started to be used by the NSA for broad surveillance. The NSA can deliver reports based on already collected data without further oversight, and the request itself can be kept classified. If the President were a superhero, national security would be their superpower.
Whether that counts as legal, depends. With a good-faith belief that this information will help secure the nation, yes. New surveillance requires approval by a special court, which denies less than one request per year. Clear abuse like collecting data on one's campaign opponent would likely get flagged even there, so this power isn't absolute.
In summary, in the US the President's access to government data is very broad, but can be contested in court. Other countries' systems work in different ways.