Mysql data but from another host

I have my site hosted with Host A, that only allows one mysql db. But I need another for a script I want to put on that site.

Can I just use a mysql database that is on another host and link to it via my site with Host A? Any pros or cons if this is possible?



It is possible, the script on Host A would need to establish a separate connection to the database on Host B.

If the one database per site is the only restriction then another possibility would be to use the same database but with a different name prefix for the tables for the new stuff eg.

The existing tables would be like xx_table_name and the new tables would be like yy_table_name. They wouldn’t necessarily be xx and yy as long as the two are not the same.

and of course you would need to “prefix” your table names in the combined database only if there are any tables with the same name in both source databases

don’t just rename them for the sake of renaming them