更改数据库或打开新连接更加密集吗?

Let's say I am using PHP to connect to MySQL. I am connected and have selected a certain database where 99.9% of my data resides.

If I wanted to pull something from a second database, residing on the same server.

Is it faster/less resource-intensive to open up a new, second connection to MySQL and select the second database, or am I better off changing to that database at the time I need the data, then changing back to resume the normal flow?

As mentioned in the comment you can give user permission to use both databases and run queries between databases with database.table.column syntax

For example the following query JOINS two tables in two databses and displays customer name and username:

SELECT C.name, U.username
FROM db1.Customers AS C
JOIN db2.Users AS U ON U.id = C.user_id 

making new connections every time is more expensive