I have an add-on domain that I am hosting a script on that requires a MySQL database. I have set up the DB, user and permission (obviously on the primary domain) but am having issues with configuring the script. For clarity we will call my primary domain www.domain.com and the add-on domain www.addon.com. If I configure the script so the URL is www.addon.com and the server is 'localhost' it's not locating the DB. If I configure the script so the URL is www.addon.com and the server is "www.domain.com" it's still not locating the DB. I even tried the script so the URL is addon.domain.com and the server is "localhost" and that didn't work..... I'm now lost - can anyone offer me some guidance please???
Contact your host. They may have permissions set that requires an ip address or are blocking remote connections.
Thanks for your comment, this is my server - however I am no expert as you can probably tell. Can you guide me on confguration.
The domain name makes no difference for the database connection. The database connection is established using the server, database name, user name and password. The server should be set to localhost since it's running on the same server as the website. I would check if your script is using the correct database name.
Localhost should work, since they're on the same server (and mySQL is on same path). I can help you set it up, just PM me cPanel info.