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.
My case's the same yours.
Change MySQL's version of the yml file to 8.4.5:
image: mysql:8.4.5
Then, in terminal run the following commands:
# docker-compose stop
# docker-compose pull
# docker-compose create
# docker-compose start
Then, change MySQL's version of the yml file to latest again:
image: mysql:latest
And finally, run the following commands again:
# docker-compose stop
# docker-compose pull
# docker-compose create
# docker-compose start
That's gonna solve your issue. One's actually an upgrade matter. Then, first upgranding first to 8.4.5 before latest fully solved my issue. You can perfectly check it out in logs with the following command:
# docker logs containername
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With