8 days ago
My MySQL service is crash-looping with /bin/bash: line 1: docker-entrypoint.sh: command not found repeatedly. Volume ID: vol_m09mc7ptmpiq2waj. Project ID: fe5ff947-9895-45e9-a9a0-ee43052adee4. It keeps trying to mount the volume but can't find the entrypoint script. Restarting doesn't help.
1 Replies
Status changed to Open Railway • 8 days ago
8 days ago
Had this exact thing a while back. docker-entrypoint.sh: command not found on the official mysql image is basically always
▎ one of 3 things on Railway:
▎
▎ 1. Volume mounted on top of a system path (90% of the time this is it)
▎ The docker-entrypoint.sh script lives in /usr/local/bin/ inside the mysql image. If your volume is mounted at
▎ /usr/local/bin, /bin, or / it shadows that script and the container has nothing to exec → crashloop.
▎
▎ Go to Service Settings → Volumes and check the mount path.
▎ - Should be: /var/lib/mysql
▎ - Anything else = thats the bug.
▎
▎ If its wrong you cant just change it in place without loosing data. You have two options:
▎ 1. Spin up a throwaway service (alpine or whatever) mount the same volume at /data, copy the raw files out / run mysqldump
▎ from a sidecar, then restore into a fresh volume mounted at /var/lib/mysql
▎ 2. If the data is disposable just delete the volume and re-create it with the right mount path
▎
▎ 2. Custom Start Command set to something weird
▎ Check Settings → Deploy → Custom Start Command. If theres something like docker-entrypoint.sh mysqld in there (without the
▎ full path) and PATH doesnt resolve it you get exactly this error.
▎ Fix: leave start command empty, let the image's default ENTRYPOINT run.
▎
▎ 3. Image got swapped
▎ If at some point the base image was changed from mysql:8 to a fork or custom build that doesnt ship the entrypoint
▎ script... thats it. Go back to mysql:8.0 or mysql:lts.
▎
▎ Easiest way to narrow it down — drop a screenshot of:
▎ - Service Settings → Source (the image)
▎ - Volumes (mount path)
▎ - Deploy → Custom Start Command
▎
▎ with those 3 its a one message fix.
Status changed to Awaiting User Response Railway • 8 days ago
21 hours ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 21 hours ago