2
I think it's no problem to have apache, PHP, and XOOPS running
on one machine, and the MySQL server on a different machine.
I think that's what some Webhosts also do.
You need to provide the database host information within the XOOPS installation process (which is then stored in mainfile.php).