I do this on a few sites.
In cPanel there is a section called: Manage Remote MySQL Access. You want to add the IP address of the site(s) that will be acessing the database.
On the site that is accessing the data you want to replace "localhost" in the DB connection string with the actual site address eg: "mysqlsite.com".
I would also set up a unique user for each site and only give them the permissions they need.