Private Networking MySQL not working between services after duplicating/deleting a project
ajnavibes
HOBBYOP

6 months ago

Hi,

I'm experiencing an issue with Private Networking between two services in my project.

Setup:

  • Service 1: Next.js app with Private Networking enabled
  • Service 2: MySQL database with Private Networking enabled
  • Both services show green checkmark and "Ready to talk privately"

Problem: My Next.js app cannot reach the MySQL database using the internal URL (mysql.railway.internal:3306). The connection fails with:

Can't reach database server at mysql.railway.internal:3306

However, when I use the public URL (MYSQL_PUBLIC_URL), the connection works perfectly.

Context: This issue started after I duplicated my workspace to create a "dev" environment and then deleted that duplicate project. Before this, the internal networking was working fine.

What I've tried:

  • Verified Private Networking is enabled on both services
  • Restarted both services
  • Redeployed both services
  • Deleted and recreated the DATABASE_URL variable

Could you please investigate why the private network connection is failing between these services?

Thank you.

$10 Bounty

1 Replies


Welcome!

Sign in to your Railway account to join the conversation.

Loading...