I'm currently using Railway's Hobby Plan and needed to increase my MySQL database size. After doing so, every restart or redeployment started failing with the error:
Invalid MySQL server upgrade: Cannot upgrade from 80300 to 90000. Upgrade to next major version is only...
I was able to solve this but didn't have much resource online for railway to help, so i thought it best to document here so others can find it later. (See My Solution in the Answer Section)
The default Docker image for MySQL in Railway points to https://hub.docker.com/_/mysql. However, this is not version-specific, so redeploying your app might result in versions mismatch since you last deployed your application/ DB server. Thus to mitigate against this, you can specify your preferred tag.
In this case, my current version is 80300 (i.e., 8.03.00, which is equal to 8.3.0
). If not specified, the Dockerfile will always point to the latest version.
To update your settings:
mysql:8.3.0
You should be good to go.