Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello, @santoshpatil
Yes, this should be doable. The access denied error usually means the database is blocking your app’s IP or the user isn’t allowed from that host.
In cPanel → Remote MySQL, whitelist the Dedicated Egress IPs from your App Platform app. Make sure the MySQL user is allowed from those IPs (not just localhost).
Hope that this helps!
Heya,
Yes, it’s possible — App Platform can absolutely talk to a remote MySQL database, cPanel included. Your “access denied for user@host” is a connection/permissions error at runtime (the build itself is probably fine), and with cPanel it almost always comes down to two things.
1. cPanel only allows MySQL from localhost by default. In cPanel there’s a Remote MySQL section (under Databases) where you whitelist which outside hosts are allowed to connect. Until your app’s host is in there, cPanel refuses it — which is exactly what you’re seeing.
2. The MySQL user has to be allowed from that host too. cPanel usually creates users as user'@'localhost'. Even after you open Remote MySQL, the grant has to permit the remote host as well.
The catch with App Platform: it doesn’t give you a single fixed outbound IP — egress comes from a shared, rotating pool. So whitelisting one specific IP in Remote MySQL tends to break later when the IP changes. The common workaround is to whitelist % (any host), which works, but it opens your DB to the whole internet — only do that with a strong password and ideally SSL enforced.
Also worth checking:
localhost — from App Platform, localhost points at the app container, not your cPanel box.Honest take: cPanel shared MySQL + App Platform works, but it’s a slightly fragile combo because of the rotating egress IPs and shared-host firewalls. If this is more than a hobby project, a DigitalOcean Managed MySQL database in the same region is a much smoother fit — private networking, no IP-whitelist juggling, and it plugs straight into App Platform. Totally fine to stick with cPanel if that’s where your data lives, though — just expect the % + strong-password tradeoff.
Hope that gets you connected.