Lost connection to MySQL server at 'reading initial communication packet' (2013)
janowak1984-cmd
HOBBYOP

18 days ago

Hi,

My MySQL service became unreachable after the recent infrastructure maintenance.

All connections fail during initial handshake with error:

"Lost connection to MySQL server at 'reading initial communication packet' (2013)"

This happens for:

- application connections

- mysqldump from CLI

- MySQL Workbench

The issue appears to be on the proxy / internal routing side.

I am on the Free plan so I cannot create UI backups.

Before any recreate/reset, I need an internal backup or snapshot of the database to preserve data.

Could you please:

1) Perform an internal backup / dump of the MySQL service

or

2) Recreate the MySQL service and restore data from internal storage

Project: friendly-dedication

Environment: production

Service: MySQL

Thank you

Jarek Nowak

Solved

11 Replies

janowak1984-cmd
HOBBYOP

18 days ago

We recreated the MySQL TCP proxy successfully
(tramway.proxy.rlwy.net:38976 → :3306) and restarted the MySQL deployment.

However, MySQL still fails during the initial handshake:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet'

This occurs consistently for:

  • mysql CLI

  • mysqldump

  • MySQL Workbench

  • application connections

This indicates an internal MySQL process failure after infrastructure maintenance, not a networking or configuration issue.

Please restart the MySQL process at the host level or recover the service from internal storage/snapshots, without recreating or deleting the database, as production data must be preserved.


janowak1984-cmd
HOBBYOP

18 days ago

We also found older Railway threads where this exact error occurred after service interruptions and was resolved by internal database recovery / redeploy handled by Railway.

This further suggests an internal MySQL runtime issue rather than a configuration problem.


edwardfc24
HOBBY

17 days ago

I’m having the same issue—restarting the container didn’t fix it. I also wasn’t able to redeploy. Is there anything we can do on our side, or are we dependent on Railway?


edwardfc24

I’m having the same issue—restarting the container didn’t fix it. I also wasn’t able to redeploy. Is there anything we can do on our side, or are we dependent on Railway?

janowak1984-cmd
HOBBYOP

17 days ago

At this point, it appears there is nothing more we can do on the client side.

We have:

- recreated the TCP proxy,

- restarted the MySQL deployment,

- verified credentials,

- tested from multiple clients (CLI, Workbench, application),

and the database still fails during the initial handshake.

This leaves us fully dependent on Railway intervention.

I want to be transparent: I’m a new Railway user, and this situation is quite disappointing.

I understand I’m on the Hobby plan and don’t have access to automated backups, but I did expect a faster response or at least a confirmation that the issue is being actively investigated.

Right now, I have no way to access my own production data, which is a critical situation for me.

Any update, even a short “we’re investigating”, would be greatly appreciated.


Railway
BOT

17 days ago

Hello!

We're acknowledging your issue and attaching a ticket to this thread.

We don't have an ETA for it, but, our engineering team will take a look and you will be updated as we update the ticket.

Please reply to this thread if you have any questions!


Railway
BOT

17 days ago

🛠️ The ticket Database connection interface loading issue has been marked as triage.


noahd
EMPLOYEE

17 days ago

Hey there!
Went ahead and attached a ticket to this thread so we can track the issue. I did try pinging the public URL and it looks like it worked just fine. Are you seeing it only over database UI or with public/private url too?


Status changed to Awaiting User Response Railway 17 days ago


janowak1984-cmd
HOBBYOP

17 days ago

Hi Noah, thanks for checking and for attaching the ticket.

To clarify: the issue occurs on all connection paths, not only in the database UI.

We have tested all of the following, with the same result:

  • Public TCP proxy (e.g. tramway.proxy.rlwy.net:<port>)

  • Service domain (mysql-production-….up.railway.app:3306)

  • Private networking (mysql.railway.internal)

  • Railway Database UI

In all cases, the TCP connection is accepted, but MySQL fails during the initial handshake, returning:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet'

This happens consistently for:

  • mysql CLI

  • mysqldump

  • MySQL Workbench

  • application connections (Flask + SQLAlchemy)

So this does not appear to be a UI-only issue or a public networking problem, but rather an internal MySQL runtime / host-level issue following the maintenance event.

At this point we are unable to retrieve any data from the database, which is production data, so we would really appreciate internal recovery or host-level investigation before any destructive action.

Please let me know if you’d like exact timestamps or logs from connection attempts — happy to provide them.


Status changed to Awaiting Railway Response Railway 17 days ago


noahd
EMPLOYEE

15 days ago

Hey there!
We pushed a fix and this should be back. Are you still running into this?


Status changed to Awaiting User Response Railway 15 days ago


janowak1984-cmd
HOBBYOP

15 days ago

Hi Noah,

confirming that after your recent fix the MySQL service is operational again.
Connections via public proxy, private networking and application clients are now working correctly, and all data appears intact.

The issue seems fully resolved on our side.

Thank you for the assistance.

Best regards,
Jarek


Status changed to Awaiting Railway Response Railway 15 days ago


Status changed to Solved janowak1984-cmd 15 days ago


Railway
BOT

14 days ago

✅ The ticket Database connection interface loading issue has been marked as completed.


Loading...