a month ago
Deployment is successful but I'm getting
"Couldn't connect to MySQL. Check that the service is running, then try again."
Logs:
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/82e75423-0297-45d9-b881-1b03ae63cc41/vol_niknzpuklvzqm62c
Starting Container
2026-10-13 13:44:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.7.2-1.el9 started.
2026-10-13 13:44:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2026-10-13 13:44:09+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.7.2-1.el9 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2026-10-13T13:44:09.720479Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2026-10-13T13:44:09.836305Z 0 [Warning] [MY-015655] [Server] Server ignores the discovered container restrictions as --container_aware is OFF
2026-10-13T13:44:09.836342Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.7.2) starting as process 1
2026-10-13T13:44:09.836360Z 0 [System] [MY-015603] [Server] MySQL Server has access to 48 logical CPUs.
2026-10-13T13:44:09.836734Z 0 [System] [MY-015603] [Server] MySQL Server has access to 402873303040 bytes of physical memory.
2026-10-13T13:44:09.844535Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-10-13T13:44:11.853245Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-10-13T13:44:12.440747Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2026-10-13T13:44:12.440797Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2026-10-13T13:44:12.451029Z 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-10-13T13:44:12.590157Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.7.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2026-10-13T13:44:12.590221Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
6 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
Your logs show MySQL started successfully, and your screenshot shows the dashboard’s Data tab is failing to connect. Could you try opening that tab in a private browser window, then on another network if it still fails? Also, are connections from your application or a MySQL client failing too, or is this limited to the dashboard?
Status changed to Awaiting User Response Railway • about 1 month ago
sam-a
Your logs show MySQL started successfully, and your screenshot shows the dashboard’s Data tab is failing to connect. Could you try opening that tab in a private browser window, then on another network if it still fails? Also, are connections from your application or a MySQL client failing too, or is this limited to the dashboard?
a month ago
Yes, we have more issues. Our code itself isn't able to connect
Traceback (most recent call last):
File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 702, in connect
self._request_authentication()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 942, in _request_authentication
self._sock = self.ctx.wrap_socket(self._sock, server_hostname=self.host)File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 1104, in _create
self.do_handshake()File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 1375, in do_handshake
self._sslobj.do_handshake()ConnectionResetError: [Errno 54] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 144, in init
self._dbapi_connection = engine.raw_connection()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3319, in raw_connection
return self.pool.connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 448, in connect
return _ConnectionFairy._checkout(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1272, in _checkout
fairy = _ConnectionRecord.checkout(pool)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
rec = pool._do_get()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 178, in _do_get
with util.safe_reraise():File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in exit
raise exc_value.with_traceback(exc_tb)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 176, in _do_get
return self._create_connection()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 389, in _create_connection
return _ConnectionRecord(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 674, in init
self.__connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in exit
raise exc_value.with_traceback(exc_tb)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 667, in connect
return dialect.connect(*cargs_tup, **cparams)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 630, in connect
return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 372, in init
self.connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 744, in connect
raise excpymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'nozomi.proxy.rlwy.net' ([Errno 54] Connection reset by peer)")
Status changed to Awaiting Railway Response Railway • about 1 month ago
shcen
Yes, we have more issues. Our code itself isn't able to connect Traceback (most recent call last): File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 702, in connect self._request_authentication() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 942, in _request_authentication self._sock = self.ctx.wrap_socket(self._sock, server_hostname=self.host) File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/opt/miniconda3/envs/project/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 54] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 144, in __init__ self._dbapi_connection = engine.raw_connection() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3319, in raw_connection return self.pool.connect() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 448, in connect return _ConnectionFairy._checkout(self) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1272, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 712, in checkout rec = pool._do_get() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 178, in _do_get with util.safe_reraise(): File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in __exit__ raise exc_value.with_traceback(exc_tb) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 176, in _do_get return self._create_connection() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 389, in _create_connection return _ConnectionRecord(self) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 674, in __init__ self.__connect() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 900, in __connect with util.safe_reraise(): File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in __exit__ raise exc_value.with_traceback(exc_tb) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 896, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 667, in connect return dialect.connect(*cargs_tup, **cparams) File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 630, in connect return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501 File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 372, in __init__ self.connect() File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 744, in connect raise exc pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'nozomi.proxy.rlwy.net' ([Errno 54] Connection reset by peer)")
a month ago
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/user/code/mains/extract_relationships_to_db.py", line 1490, in main
run_kind(File "code.py", line 1024, in run_kind
require_schema(engine, kind, source_table, results_table)File "code.py", line 458, in require_schema
if not _table_exists(engine, source_table):File "code.py", line 424, in _table_exists
with engine.connect() as conn:File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3295, in connect
return self._connection_cls(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 146, in init
Connection._handle_dbapi_exception_noconnection(File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2450, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from eFile "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 144, in init
self._dbapi_connection = engine.raw_connection()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 3319, in raw_connection
return self.pool.connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 448, in connect
return _ConnectionFairy._checkout(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 1272, in _checkout
fairy = _ConnectionRecord.checkout(pool)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
rec = pool._do_get()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 178, in _do_get
with util.safe_reraise():File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in exit
raise exc_value.with_traceback(exc_tb)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 176, in _do_get
return self._create_connection()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 389, in _create_connection
return _ConnectionRecord(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 674, in init
self.__connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 122, in exit
raise exc_value.with_traceback(exc_tb)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 667, in connect
return dialect.connect(*cargs_tup, **cparams)File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 630, in connect
return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 372, in init
self.connect()File "/opt/miniconda3/envs/project/lib/python3.10/site-packages/pymysql/connections.py", line 744, in connect
raise excsqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'nozomi.proxy.rlwy.net' ([Errno 54] Connection reset by peer)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
Try clicking on your MySQL service, press Cmd/Ctrl + K, and deploy source image.
0x5b62656e5d
Try clicking on your MySQL service, press Cmd/Ctrl + K, and deploy source image.
a month ago
Tried this already!
a month ago
AI-assisted. Your traceback fails inside ssl.do_handshake(), so error 2003 alone does not establish a password problem.
To narrow this down without changing your database, could you provide:
- The exact PyMySQL, Python and OpenSSL versions.
- Which TLS option names are set and the boolean certificate/hostname-verification settings. Please omit connection URLs, passwords, keys, certificate files and private paths.
- Whether the TCP Proxy target matches MySQL’s listening port shown in your logs (3306), rather than the X Protocol port 33060.
- If you have already tested a native MySQL client with certificate verification enabled, does it fail too? Share only its error code; no new repeated connection attempts are needed.
These details would help distinguish client TLS compatibility/settings from a proxy or server-side reset. The cause is not established yet; there is no evidence here that justifies resetting the password or disabling TLS verification.