MySQL - 两个数据库上的双连接?

This is just a quick question, I couldn't find it on the internet, but I did wanted to have a confirmation.

Say that if I, using PHP, want to connect to (for both the same) MySQL server, but I want to use two databases, not tables. Because you can connect to only one MySQL-database in the PHP mysqli_connect() command, will, connecting to two databases, though on the same server, use two connections.

Because then it'll probably go fast with the max_connections, right?

P.S. What was the SQL-command again to see the mac_connections value again? I thought it started with GET GLOBAL ... or something, but I might be wrong. I do not have access to the server, only to (limited) FTP files (it's a bit irritating).

I already found it, though I ran into it by pure accident mysqli_select_db().

SHOW VARIABLES LIKE '%max_connections%'

If you have both databases in same server you can connect to the server and select one database. You can query from any other databases in the server as long as you have permission. Use the syntax databasename.tablename.columnname in your queries.

If your databases are in different server you may have to do little more work on the server side. you can use the The FEDERATED Storage Engine