How to persist old MySQL 5.7 with volume

I'm deploying https://hub.docker.com/r/cytopia/mysql-5.7 as a service. When mounting a volume to /var/lib/mysql
I get this error: --initialize specified but the data directory has files in it. Aborting.
Solution:
and here you go, a ready to deploy mysql 5.7 template https://railway.app/template/KAUNf- but you should just be able to search for it from the + new buttom...
Jump to solution
9 Replies
Percy
Percy9mo ago
Project ID: 5a24ad58-38fd-44b0-ac79-47f2f1093c71
dwaynemac
dwaynemac9mo ago
5a24ad58-38fd-44b0-ac79-47f2f1093c71
Brody
Brody9mo ago
will also look into this was able to reproduce this error and found a work around that I've implemented successfully, so now I can actually connect to it through the private network fine but not from the public tcp proxy lol had to run out, so I'll pick this back up when I get home
Solution
Brody
Brody9mo ago
and here you go, a ready to deploy mysql 5.7 template https://railway.app/template/KAUNf- but you should just be able to search for it from the + new buttom
Brody
Brody9mo ago
test deployed the template and i can connect and ping it both from its public address and its internal address
dwaynemac
dwaynemac9mo ago
Awesome! Does it have MYSQL_URL and MYSQL_PRIVATE_URL too?
Brody
Brody9mo ago
indeed want a DSN too?
dwaynemac
dwaynemac9mo ago
Great!! Thx
Brody
Brody9mo ago
no problem!