Migrate to Railway
medaliorh
PROOP

3 months ago

Hello , i have a worpress project which i used to host on Namecheap , but now i wanna migrate to railway , i did downlod the backup files and i have a Wp_dump.sql file , icreated a new Project using a template for worpress+MariaDb, i also installed and connected railway to my computer terminal , i've been trying for a while to connect to that database and dump the file but i just keep hitting connection errors , i've even opened a public Domain , and yet i can't connect to the database ! please any helpers !! ,

Solved$30 Bounty

0 Replies

noahd
EMPLOYEE

3 months ago

Hey there Kennsey!
So to clarify, the main issue currently is connecting to the database right?


medaliorh
PROOP

3 months ago

hi , yes i've been into that issue , but i just deleted everything and i'm trying once again with Mysql , just to explain , my objectif is to migrate to railway to host my projects ,and stop using namecheap , but there's a wordpress project (who isn't mine) that i want to also host in railway , this way i only have one host, so my objectif is to take that worpress project and dump its database and its content into railway to host it


irazvan2745
PRO

3 months ago

Hey, did you import the dump into the db?


medaliorh
PROOP

3 months ago

on namecheap , they used easyWP , i just downloaded a backup of the project and ended up with 2 compressed files , files(which are the wordpress files ) and database (which is a wp_sump.sql)


noahd
EMPLOYEE

3 months ago

Okay that clears it up wonderful!
What's your current method of hosting the Wordpress site? Are you using an official image or just setting the code up?


medaliorh
PROOP

3 months ago

help me do that , so to do the things clean , should i start by creating a wordpress+MariaDb template or Wordpress+Mysql template


noahd
EMPLOYEE

3 months ago

What was your existing database? MySQL or MariaDB?


irazvan2745
PRO

3 months ago

Install the mariadb/MySQL client on your computer and run this

mysql -h db.example.com -P 3306 -u -p 'my password here' mydb < dump.sql


irazvan2745
PRO

3 months ago

Replace the dummy text


medaliorh
PROOP

3 months ago

it should be just setting the code up in namecheap's server , since i cannot acces em files without using easyWP


medaliorh
PROOP

3 months ago

i did try that but it ends up with timeout , maybe cause the wp_sump.sql file is 3.4GB


noahd
EMPLOYEE

3 months ago

Oh my


medaliorh
PROOP

3 months ago

but sure let's try that again


noahd
EMPLOYEE

3 months ago

Around how long into the upload does it timeout?


irazvan2745
PRO

3 months ago

Oh uhh


medaliorh
PROOP

3 months ago

yeah and the files compressed are almost 28GB it's so fkin annoying , i fkin hate NoCode devs


noahd
EMPLOYEE

3 months ago

Yeah wild…


noahd
EMPLOYEE

3 months ago

_ _


medaliorh
PROOP

3 months ago

is there a voice channel where i can share my screen ??


noahd
EMPLOYEE

3 months ago

Not quite sure there is here. Can you just try sharing screenshots?


medaliorh
PROOP

3 months ago

i don't know exactly like almost 2 min


noahd
EMPLOYEE

3 months ago

So it does start uploading it just times out


noahd
EMPLOYEE

3 months ago

Can I see the actual error you get? As long as it doesnt have any sensitive information in it 😁


medaliorh
PROOP

3 months ago

1412844128710164500


medaliorh
PROOP

3 months ago

i'll go with this


medaliorh
PROOP

3 months ago

nah i can't connect to the database either , i was trying to upload stuff part by parts


medaliorh
PROOP

3 months ago

lemme show


noahd
EMPLOYEE

3 months ago

Oh so it fails to even start? Interesting


medaliorh
PROOP

3 months ago

1412844649764098000


medaliorh
PROOP

3 months ago

now, is there a way to conect to the database from shell ??


irazvan2745
PRO

3 months ago

Mysql client


irazvan2745
PRO

3 months ago

.


noahd
EMPLOYEE

3 months ago

You can!



medaliorh
PROOP

3 months ago

looks like host is empty

1412845164665503700


noahd
EMPLOYEE

3 months ago

Have you done an initial deployment of that service?


noahd
EMPLOYEE

3 months ago

1412845356336812000


medaliorh
PROOP

3 months ago

No , should i ? cause i want to dump the database anyways


noahd
EMPLOYEE

3 months ago

You should start up the database at least once to "create" it


noahd
EMPLOYEE

3 months ago

then once the service is running you should be able to railway connect to it and execute shell commands.


medaliorh
PROOP

3 months ago

1412845841864987000


irazvan2745
PRO

3 months ago

Click deploy on railway


noahd
EMPLOYEE

3 months ago

Have you done an initial deployment via the web?


medaliorh
PROOP

3 months ago

1412846019586035700


noahd
EMPLOYEE

3 months ago

Hmmm, railway might have not refreshed yet? Maybe close and reopen it…


noahd
EMPLOYEE

3 months ago

it should show that off as it does have a volume


medaliorh
PROOP

3 months ago

nop


irazvan2745
PRO

3 months ago

Shouldn’t it have crashed if the env variables were wrong?


medaliorh
PROOP

3 months ago

i've even tried to expose the database


noahd
EMPLOYEE

3 months ago

Can you link the template you are using? interested in trying myself


medaliorh
PROOP

3 months ago

just go to template and search for wordpress , it's the most used one


medaliorh
PROOP

3 months ago

wordpress+MariaDb


noahd
EMPLOYEE

3 months ago

checking 👍


medaliorh
PROOP

3 months ago

should've created my own stuff instead of importing the templates ?


noahd
EMPLOYEE

3 months ago

Well, i dont think that theres that much of an issue using the template


noahd
EMPLOYEE

3 months ago

1412847196805660700


medaliorh
PROOP

3 months ago

like having the stuff setup locally then try to upload them to railway ??


noahd
EMPLOYEE

3 months ago

So, I deployed and connected to the mariadb service


noahd
EMPLOYEE

3 months ago

and thats very interesting

1412847322735448300


noahd
EMPLOYEE

3 months ago

Let me try one more thing, I have a theory


medaliorh
PROOP

3 months ago

wordpress works flawlessly tho


noahd
EMPLOYEE

3 months ago

That theory is, do you have the mysql client installed on your machine?


medaliorh
PROOP

3 months ago

i feel like i'll be exporting stuff one by one !


medaliorh
PROOP

3 months ago

i do


irazvan2745
PRO

3 months ago

Do this then


medaliorh
PROOP

3 months ago

but wut is the -h ?


noahd
EMPLOYEE

3 months ago

So Railway CLI looks like it doesnt recognize this MariaDB instance. Let's try via public endpoint


irazvan2745
PRO

3 months ago

The host


medaliorh
PROOP

3 months ago

oh should i use the wordpress one ?


medaliorh
PROOP

3 months ago

1412848069321560000


medim
MODERATOR

3 months ago

MariaDB doesn't seems to have a shell by default on $PATH so that's why railway connect fails as according to the docs (?)


noahd
EMPLOYEE

3 months ago

use the

1412848123440664600


noahd
EMPLOYEE

3 months ago

Well, mariaDB is also mysql compat


medaliorh
PROOP

3 months ago

lemme try that


noahd
EMPLOYEE

3 months ago

I might actually be wrong on this. If maria and mysql are cross compat it might be interesting to try a template with mysql instead of mariadb


medaliorh
PROOP

3 months ago

there's a private host tho


noahd
EMPLOYEE

3 months ago

are you on windows or mac?


medaliorh
PROOP

3 months ago

linux


noahd
EMPLOYEE

3 months ago

unix cli cool


medaliorh
PROOP

3 months ago

parrot OS


noahd
EMPLOYEE

3 months ago

Trying a couple of configuration things real quick. Might be on to something


irazvan2745
PRO

3 months ago

apt install mariadb-client


irazvan2745
PRO

3 months ago

Or whatever your package manager is


irazvan2745
PRO

3 months ago

Then run the command I sent but replace the dummy text


medaliorh
PROOP

3 months ago

1412849841339498500


noahd
EMPLOYEE

3 months ago

That has your password in it, would suggest changing that for future ref 😁


noahd
EMPLOYEE

3 months ago

I'm testing out the wordpress + mysql template


medaliorh
PROOP

3 months ago

idc ket's just make it work and i'll be building another project


irazvan2745
PRO

3 months ago

Use the public endpoint


noahd
EMPLOYEE

3 months ago

if you dont have this set on your mariadb thing you should

1412850205161951200


medaliorh
PROOP

3 months ago

so i'll setup a public endpoint once again right ?


noahd
EMPLOYEE

3 months ago

I think… Unsure how similar the settings for maria/mysql are compared to postgres (which i mainly use)


noahd
EMPLOYEE

3 months ago

This mysql template is looking promising


medaliorh
PROOP

3 months ago

1412850558871671000


irazvan2745
PRO

3 months ago

Also uhh, maybe change the password


noahd
EMPLOYEE

3 months ago

Its a dummy project rn he'll change it later


irazvan2745
PRO

3 months ago

Ah alr


noahd
EMPLOYEE

3 months ago

Alright so!


noahd
EMPLOYEE

3 months ago

mysql client works on this mysql template


medaliorh
PROOP

3 months ago

yeah i did


noahd
EMPLOYEE

3 months ago

1412850822785536000


noahd
EMPLOYEE

3 months ago

Was able to connect on this


medaliorh
PROOP

3 months ago

if you have a template working just give me it at this point


irazvan2745
PRO

3 months ago

It’s just what you’re using prob



noahd
EMPLOYEE

3 months ago

This is the template that I used.


noahd
EMPLOYEE

3 months ago

Looks like it has 100% success across 237 active projects

1412851070111187000


medaliorh
PROOP

3 months ago

.


noahd
EMPLOYEE

3 months ago

Railway CLI also works over this

1412851241691779000


medaliorh
PROOP

3 months ago

looks like i ecceded the limit does the deleted projects also counts ?

1412851249321218000


irazvan2745
PRO

3 months ago

Delete the old one


noahd
EMPLOYEE

3 months ago

Nope! Just delete the old one or choose to add it to an existing project


noahd
EMPLOYEE

3 months ago

1412851448626020600


medaliorh
PROOP

3 months ago

looks like i cant

1412851633666265000


noahd
EMPLOYEE

3 months ago

So you are unable to delete the existing project on the free plan?


medaliorh
PROOP

3 months ago

i'm just gonna cancel deletion of this one

1412851782878630000


medaliorh
PROOP

3 months ago

oh maybe delete permently


noahd
EMPLOYEE

3 months ago

I think they are scheduled deletions. 30 days of grace when you click that in case of misclick


medaliorh
PROOP

3 months ago

allright it worked


irazvan2745
PRO

3 months ago

Yeah


medaliorh
PROOP

3 months ago

alright let's try with this

1412852150975070200


noahd
EMPLOYEE

3 months ago

So you can grab the connection URI from the MySQL variables


noahd
EMPLOYEE

3 months ago

1412852247364374500


irazvan2745
PRO

3 months ago

That’s prob an internal one


noahd
EMPLOYEE

3 months ago

And connect with the native mysql client.
Or just railway link > choose project > choose env > select service


noahd
EMPLOYEE

3 months ago

it is not


irazvan2745
PRO

3 months ago

Ah


noahd
EMPLOYEE

3 months ago

Then once you select the right project run railway connect and you should have access to the mysql console.


medaliorh
PROOP

3 months ago

1412852475257426000


medaliorh
PROOP

3 months ago

nice

1412852579703980300


medaliorh
PROOP

3 months ago

now to dump


noahd
EMPLOYEE

3 months ago

There you go! Now dumping should work. Let me know how that looks


irazvan2745
PRO

3 months ago

^^


noahd
EMPLOYEE

3 months ago

No need. railway connect does one for you


noahd
EMPLOYEE

3 months ago

Kennsey is currently in mysql shell as you can see here.


irazvan2745
PRO

3 months ago

Doesn’t he want to import the dump?


noahd
EMPLOYEE

3 months ago

You can do so via that iirc


irazvan2745
PRO

3 months ago

Pretty sure you can’t, that’s just a “terminal”, may be wrong


medaliorh
PROOP

3 months ago

yes


medaliorh
PROOP

3 months ago

i'm trying the railway run


medaliorh
PROOP

3 months ago

do you have a better suggestion >?


irazvan2745
PRO

3 months ago

Mariadb client


noahd
EMPLOYEE

3 months ago

we're now using mysql 😁


irazvan2745
PRO

3 months ago

Or MySQL client


irazvan2745
PRO

3 months ago

They are cross compatible


noahd
EMPLOYEE

3 months ago

mysql --protocol=TCP --connect-timeout=30 --ssl-mode=PREFERRED -h HOSTURL -P PORT -u root --password=PASSWORD railway &lt; ./path

should work


noahd
EMPLOYEE

3 months ago

Obviously replacing HOSTURL PORT and PASSWORD alongside ./path


noahd
EMPLOYEE

3 months ago

dumps are very annoying to backup and work with


noahd
EMPLOYEE

3 months ago

It'll probably warn "its not best to use pasword in cli!" but thats alright


medaliorh
PROOP

3 months ago

i'm running this one and it's takin sometime

1412854642131599400


noahd
EMPLOYEE

3 months ago

Yeah I'd give it a good minute. Will take a bit


medaliorh
PROOP

3 months ago

maybe it worked but the dump is heavy that's why


noahd
EMPLOYEE

3 months ago

Your command will finish running when its done.


medaliorh
PROOP

3 months ago

hopefully it doean't timeout


noahd
EMPLOYEE

3 months ago

It shouldnt time out I don't think


medaliorh
PROOP

3 months ago

1412855137726365700


medaliorh
PROOP

3 months ago

i


medaliorh
PROOP

3 months ago

i'll try urs


noahd
EMPLOYEE

3 months ago

Oh?


noahd
EMPLOYEE

3 months ago

yeah thats running over railway run <:Hmmmmm:891565000068587551>


irazvan2745
PRO

3 months ago

id recommend using mysql cli, not railway run


noahd
EMPLOYEE

3 months ago

Thats what hes doing now 😁


medaliorh
PROOP

3 months ago

mysql --protocol=TCP --connect-timeout=30 --ssl-mode=PREFERRED -h HOSTURL -P PORT -u root --password=PASSWORD railway < ./path


irazvan2745
PRO

3 months ago

"railway run"


medaliorh
PROOP

3 months ago

for this cmd should i setup a TCP ?


noahd
EMPLOYEE

3 months ago

It should be enabled already. If you look at settings > network


medaliorh
PROOP

3 months ago

1412855678443454500


noahd
EMPLOYEE

3 months ago

so for me on the mySQL instance

1412855729764827100


noahd
EMPLOYEE

3 months ago

On this not the docker image

1412855792117223400


medaliorh
PROOP

3 months ago

oh My bad i was on the docker image


noahd
EMPLOYEE

3 months ago

all good!


medaliorh
PROOP

3 months ago

wut would u do on --ssl-mode=PREFERRED ?


noahd
EMPLOYEE

3 months ago

iirc thats just the plain mode 😂


irazvan2745
PRO

3 months ago

its optional


noahd
EMPLOYEE

3 months ago

According to google: "enables encryption if available."


medaliorh
PROOP

3 months ago

went with this

1412856831843500300


noahd
EMPLOYEE

3 months ago

Let me know how it goes


noahd
EMPLOYEE

3 months ago

Hows it looking?


medaliorh
PROOP

3 months ago

still running


medaliorh
PROOP

3 months ago

1412858166554661000


medaliorh
PROOP

3 months ago

hmm looks like working


medaliorh
PROOP

3 months ago

it's still running tho


noahd
EMPLOYEE

3 months ago

Great its uploading then!


medaliorh
PROOP

3 months ago

about the other wordpress files how do you think i can import them ?


medaliorh
PROOP

3 months ago

add me friend btw ❤️


noahd
EMPLOYEE

3 months ago

Well. I am unfortunately not as familiar with wordpress as I'd like to be. I can give it a peek and see what others have done


medaliorh
PROOP

3 months ago

most of people just use plugins


medaliorh
PROOP

3 months ago

but if just the database is sumped that's a huge progress for me


medaliorh
PROOP

3 months ago

i owe u guys big time


noahd
EMPLOYEE

3 months ago

Yeah I sadly just dont know wordpress well enough to say "this is your answer for wordpress!"


noahd
EMPLOYEE

3 months ago

But for databases I live in those


medaliorh
PROOP

3 months ago

idk what's wrong with that MariDB connections , is it too secure or wut ?


medaliorh
PROOP

3 months ago

DW i hate wordpress 2 x)


noahd
EMPLOYEE

3 months ago

It might have just been a different service that railway didnt recognize as a standard "database"


noahd
EMPLOYEE

3 months ago

compared to mongo/pg/mysql


noahd
EMPLOYEE

3 months ago

which is funky but oh well!


noahd
EMPLOYEE

3 months ago

Is it still uploading the sql dump?


medaliorh
PROOP

3 months ago

yes xD


medaliorh
PROOP

3 months ago

should've added a checkpoint dot


noahd
EMPLOYEE

3 months ago

Okay cool! Well, is that all for this thread haha?


medaliorh
PROOP

3 months ago

well we fixed my database connection for sure ,by using a different database x)


medaliorh
PROOP

3 months ago

so yeah that's why i openned this thread


noahd
EMPLOYEE

3 months ago

Yeah thats still funky why the shell wasn't connecting on mariadb hmm. Something to remember


medaliorh
PROOP

3 months ago

question


noahd
EMPLOYEE

3 months ago

Answer <:picassoface:1398147502598918144>


medaliorh
PROOP

3 months ago

will i hit the max volume ?

1412861180296565000


noahd
EMPLOYEE

3 months ago

If you said your SQL dump was ~3g and your volume only has 500mb yes you will.


medaliorh
PROOP

3 months ago

the dump file is 3g


medaliorh
PROOP

3 months ago

but wait i should see that colume progress right ?


medaliorh
PROOP

3 months ago

volume *


noahd
EMPLOYEE

3 months ago

Volume progress?


noahd
EMPLOYEE

3 months ago

Theres a pretty good chance you reach the max with a dump that large unless I'm missing something.


medaliorh
PROOP

3 months ago

this should do the trick ?

1412861747643289600


noahd
EMPLOYEE

3 months ago

It sure should! Thats the plan I currently have.
If you really need more data (then what the pro plan provides) you can create another thread and we can talk to the team about expanding volume size.


medaliorh
PROOP

3 months ago

wtf even is this website having a freaking 3gb database ! i fkin hate wordpress


noahd
EMPLOYEE

3 months ago

-# You and me both 😂


medaliorh
PROOP

3 months ago

this is so not normal


medaliorh
PROOP

3 months ago

the volume Usage doesn't progress tho i'm worried


medaliorh
PROOP

3 months ago

if the dump file fails i'll have to clean the database and try again ?


noahd
EMPLOYEE

3 months ago

I believe so yes. I'm not sure if sql dumps resume or not.


noahd
EMPLOYEE

3 months ago

Or if they clear progress if fail


medaliorh
PROOP

3 months ago

FReak !


medaliorh
PROOP

3 months ago

i upgraded the size and it aboarted


noahd
EMPLOYEE

3 months ago

Checks out that it would do that 😁


medaliorh
PROOP

3 months ago

hmm should i just run the command again , or do i have to clean the database


medaliorh
PROOP

3 months ago

cause it's still full


noahd
EMPLOYEE

3 months ago

I'd clean and run again to be safe


medaliorh
PROOP

3 months ago

wait


noahd
EMPLOYEE

3 months ago

waiting


medaliorh
PROOP

3 months ago

maybe it failed for another reason


medaliorh
PROOP

3 months ago

1412863459284095000


medaliorh
PROOP

3 months ago

was it just a coincidnce ?


noahd
EMPLOYEE

3 months ago

I'd just delete and restart yeah.


medaliorh
PROOP

3 months ago

naaah i don't think so , it's probably the resizing


medaliorh
PROOP

3 months ago

wait i can't drop db


irazvan2745
PRO

3 months ago

change the dump


irazvan2745
PRO

3 months ago

so its the correct db name and such


medaliorh
PROOP

3 months ago

yeah i just droped railways database and recreated it x)


medaliorh
PROOP

3 months ago

i give 5gb to the database , now if i don't reach the 5GB and for instance it's just 900MB i can downsize it right ?


noahd
EMPLOYEE

3 months ago

You can but I'd suggest giving it some padding in case it somehow goes over.
When you allocate 5g it doesnt remove a flat 5g from your available storage. If your actual data only takes 900mb it only costs 900mb worth


noahd
EMPLOYEE

3 months ago

does that make sense?


medaliorh
PROOP

3 months ago

Oh!


medaliorh
PROOP

3 months ago

that's better then


medaliorh
PROOP

3 months ago

i've got a proplan now
@Pro Plan - This role is for any member of a Team building their awesome product on Railway. Company? We help you with migrations from cloud platforms of varying sorts.
i should be able to get a support who will help me through all the migartion right ?


noahd
EMPLOYEE

3 months ago

I'm actually not too sure on that. This is a community bounty which means its open for the community to help


medaliorh
PROOP

3 months ago

i guess there's progress here

1412865186506870800


medaliorh
PROOP

3 months ago

already reaching 1GB unbelievable

1412865534688497700


medaliorh
PROOP

3 months ago

wait i did select 5GB but it's written 32 GB


medaliorh
PROOP

3 months ago

but as u said it doesn't matter how much i allocated , what matter is how much i'm using


noahd
EMPLOYEE

3 months ago

Yep! Usage based not allocation based


medaliorh
PROOP

3 months ago

hoepfully the database dump would be enough for the whole website


medaliorh
PROOP

3 months ago

because 3GB it gotta be populating the tables


medaliorh
PROOP

3 months ago

ain't no way it's just the structure


medaliorh
PROOP

3 months ago

4GB x)


medaliorh
PROOP

3 months ago

@Error Do u mind adding me a friend , i really appreciate ur help ! ❤️


noahd
EMPLOYEE

3 months ago

Hey! My DMs are open but I've slowly stopped adding a bunch of people unless I need to. Nothing personal at all 😁


medaliorh
PROOP

3 months ago

wohoo looks like it's finished 0.0


noahd
EMPLOYEE

3 months ago

Yay!


noahd
EMPLOYEE

3 months ago

Am I good to close out this thread?


medaliorh
PROOP

3 months ago

fine then


noahd
EMPLOYEE

3 months ago

Happy to have helped <:picassoface:1398147502598918144>


Status changed to Solved noahd 3 months ago


noahd
EMPLOYEE

2 months ago

!s


Loading...