MySQL WebSocket connection failed
shcen
PROOP

2 months ago

Cannot connect to mysql database

Screenshot 2026-08-18 at 2.44.43 PM.png

Attachments

$20 Bounty

6 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 2 months ago


shcen
PROOP

2 months ago

Some logs

2026-08-18T21:46:00.706026665Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/4a7d4c11-dd4f-4ed7-a05b-fdea5ae7daa0/vol_niknzpuklvzqm62c

2026-08-18T21:46:02.225391135Z [inf] Starting Container

2026-08-18T21:46:04.450760684Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started.

2026-08-18T21:46:04.450791339Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2026-08-18T21:46:04.450795644Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started.

2026-08-18T21:46:04.450799608Z [inf] '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'

2026-08-18T21:46:04.450803984Z [err] 2026-08-18T21:46:02.183818Z 0 [System] [MY-015015] [Server] MySQL Server - start.

2026-08-18T21:46:04.450809267Z [err] 2026-08-18T21:46:02.304763Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.4.0) starting as process 1

2026-08-18T21:46:04.450813005Z [err] 2026-08-18T21:46:02.304778Z 0 [System] [MY-015590] [Server] MySQL Server has access to 32 logical CPUs.

2026-08-18T21:46:04.450817347Z [err] 2026-08-18T21:46:02.304791Z 0 [System] [MY-015590] [Server] MySQL Server has access to 32000000000 bytes of physical memory.

2026-08-18T21:46:04.450822386Z [err] 2026-08-18T21:46:02.322519Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2026-08-18T21:46:04.450827261Z [err] 2026-08-18T21:46:04.324014Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2026-08-18T21:46:06.112903097Z [err] 2026-08-18T21:46:04.966422Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2026-08-18T21:46:06.112918614Z [err] 2026-08-18T21:46:04.966475Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2026-08-18T21:46:06.112925682Z [err] 2026-08-18T21:46:04.971045Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2026-08-18T21:46:06.112931603Z [err] 2026-08-18T21:46:05.104809Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock

2026-08-18T21:46:06.112938065Z [err] 2026-08-18T21:46:05.104995Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.4.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.


shcen
PROOP

2 months ago

(Removed a comment - ignore this)


shcen

Some logs 2026-08-18T21:46:00.706026665Z [inf] Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/4a7d4c11-dd4f-4ed7-a05b-fdea5ae7daa0/vol_niknzpuklvzqm62c 2026-08-18T21:46:02.225391135Z [inf] Starting Container 2026-08-18T21:46:04.450760684Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started. 2026-08-18T21:46:04.450791339Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2026-08-18T21:46:04.450795644Z [inf] 2026-08-18 21:46:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started. 2026-08-18T21:46:04.450799608Z [inf] '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' 2026-08-18T21:46:04.450803984Z [err] 2026-08-18T21:46:02.183818Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2026-08-18T21:46:04.450809267Z [err] 2026-08-18T21:46:02.304763Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.4.0) starting as process 1 2026-08-18T21:46:04.450813005Z [err] 2026-08-18T21:46:02.304778Z 0 [System] [MY-015590] [Server] MySQL Server has access to 32 logical CPUs. 2026-08-18T21:46:04.450817347Z [err] 2026-08-18T21:46:02.304791Z 0 [System] [MY-015590] [Server] MySQL Server has access to 32000000000 bytes of physical memory. 2026-08-18T21:46:04.450822386Z [err] 2026-08-18T21:46:02.322519Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2026-08-18T21:46:04.450827261Z [err] 2026-08-18T21:46:04.324014Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2026-08-18T21:46:06.112903097Z [err] 2026-08-18T21:46:04.966422Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2026-08-18T21:46:06.112918614Z [err] 2026-08-18T21:46:04.966475Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2026-08-18T21:46:06.112925682Z [err] 2026-08-18T21:46:04.971045Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. 2026-08-18T21:46:06.112931603Z [err] 2026-08-18T21:46:05.104809Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2026-08-18T21:46:06.112938065Z [err] 2026-08-18T21:46:05.104995Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.4.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.

lofimit
HOBBY

2 months ago

The MySQL service itself seems fine.

Could you try to test the connectivity from another Railway service? Connect to the MySQL private hostname on 3306 using nc or a MySQL client.


shcen
PROOP

2 months ago

Hm. Another database is showing the circle of death (keeps spinning for 10+ minutes)

Screenshot 2026-08-18 at 4.52.37 PM.png

Attachments


Try clicking on the service then press Ctrl/Cmd + K and redeploy source image. (This may also be associated with the current incident)


algokev
HOBBY

2 months ago

Hey, I’m pretty sure the MySQL/WebSocket connection issue you’re seeing could be related to the current Railway incident.

Railway is currently reporting a load issue in their infrastructure that’s affecting deployments and builds. They specifically mentioned deployments getting stuck in an initializing state, delayed/failed builds, and that they’re still working on restoring full capacity.

Since your error is websocket when trying to connect to MySQL, I’d first wait until Railway finishes resolving the incident and then try the connection again. I wouldn’t immediately change your MySQL credentials, connection string, or database settings unless the issue continues after Railway is back to normal cause I've done that before and I just regretted going through all that.

You could also try redeploying/restarting the service once Railway shows the incident as resolved. If it still fails after that, then I’d start checking the actual database connection details, environment variables, hostname/port, and whether the MySQL service itself is reachable.

At the moment, though, the timing makes the Railway infrastructure issue a pretty strong possibility, especially since they’re actively reporting deployment/build problems right now.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...