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 !! ,
0 Replies
3 months ago
Hey there Kennsey!
So to clarify, the main issue currently is connecting to the database right?
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
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)
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?
help me do that , so to do the things clean , should i start by creating a wordpress+MariaDb template or Wordpress+Mysql template
3 months ago
What was your existing database? MySQL or MariaDB?
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
it should be just setting the code up in namecheap's server , since i cannot acces em files without using easyWP
i did try that but it ends up with timeout , maybe cause the wp_sump.sql file is 3.4GB
3 months ago
Oh my
3 months ago
Around how long into the upload does it timeout?
yeah and the files compressed are almost 28GB it's so fkin annoying , i fkin hate NoCode devs
3 months ago
Yeah wild…
3 months ago
_ _
3 months ago
Not quite sure there is here. Can you just try sharing screenshots?
3 months ago
So it does start uploading it just times out
3 months ago
Can I see the actual error you get? As long as it doesnt have any sensitive information in it 😁
nah i can't connect to the database either , i was trying to upload stuff part by parts
3 months ago
Oh so it fails to even start? Interesting
3 months ago
You can!
3 months ago
With Railway connect https://docs.railway.com/reference/cli-api#connect
3 months ago
Have you done an initial deployment of that service?
3 months ago

3 months ago
You should start up the database at least once to "create" it
3 months ago
then once the service is running you should be able to railway connect to it and execute shell commands.
3 months ago
Have you done an initial deployment via the web?
3 months ago
Hmmm, railway might have not refreshed yet? Maybe close and reopen it…
3 months ago
it should show that off as it does have a volume
3 months ago
Can you link the template you are using? interested in trying myself
3 months ago
checking 👍
3 months ago
Well, i dont think that theres that much of an issue using the template
3 months ago

3 months ago
So, I deployed and connected to the mariadb service
3 months ago
and thats very interesting

3 months ago
Let me try one more thing, I have a theory
3 months ago
That theory is, do you have the mysql client installed on your machine?
3 months ago
So Railway CLI looks like it doesnt recognize this MariaDB instance. Let's try via public endpoint
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 (?)
3 months ago
use the

3 months ago
Well, mariaDB is also mysql compat
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
3 months ago
are you on windows or mac?
3 months ago
unix cli cool
3 months ago
Trying a couple of configuration things real quick. Might be on to something
3 months ago
That has your password in it, would suggest changing that for future ref 😁
3 months ago
I'm testing out the wordpress + mysql template
3 months ago
if you dont have this set on your mariadb thing you should

3 months ago
I think… Unsure how similar the settings for maria/mysql are compared to postgres (which i mainly use)
3 months ago
This mysql template is looking promising
3 months ago
Its a dummy project rn he'll change it later
3 months ago
Alright so!
3 months ago
mysql client works on this mysql template
3 months ago

3 months ago
Was able to connect on this
3 months ago
This is the template that I used.
3 months ago
Looks like it has 100% success across 237 active projects

3 months ago
Railway CLI also works over this

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

3 months ago
So you are unable to delete the existing project on the free plan?
3 months ago
I think they are scheduled deletions. 30 days of grace when you click that in case of misclick
3 months ago
So you can grab the connection URI from the MySQL variables
3 months ago

3 months ago
And connect with the native mysql client.
Or just railway link > choose project > choose env > select service
3 months ago
it is not
3 months ago
Then once you select the right project run railway connect and you should have access to the mysql console.
3 months ago
There you go! Now dumping should work. Let me know how that looks
3 months ago
No need. railway connect does one for you
3 months ago
Kennsey is currently in mysql shell as you can see here.
3 months ago
You can do so via that iirc
3 months ago
we're now using mysql 😁
3 months ago
mysql --protocol=TCP --connect-timeout=30 --ssl-mode=PREFERRED -h HOSTURL -P PORT -u root --password=PASSWORD railway < ./pathshould work
3 months ago
Obviously replacing HOSTURL PORT and PASSWORD alongside ./path
3 months ago
dumps are very annoying to backup and work with
3 months ago
It'll probably warn "its not best to use pasword in cli!" but thats alright
3 months ago
Yeah I'd give it a good minute. Will take a bit
3 months ago
Your command will finish running when its done.
3 months ago
It shouldnt time out I don't think
3 months ago
Oh?
3 months ago
yeah thats running over railway run <:Hmmmmm:891565000068587551>
3 months ago
Thats what hes doing now 😁
mysql --protocol=TCP --connect-timeout=30 --ssl-mode=PREFERRED -h HOSTURL -P PORT -u root --password=PASSWORD railway < ./path
3 months ago
It should be enabled already. If you look at settings > network
3 months ago
so for me on the mySQL instance

3 months ago
On this not the docker image

3 months ago
all good!
3 months ago
iirc thats just the plain mode 😂
3 months ago
According to google: "enables encryption if available."
3 months ago
Let me know how it goes
3 months ago
Hows it looking?
3 months ago
Great its uploading then!
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
3 months ago
Yeah I sadly just dont know wordpress well enough to say "this is your answer for wordpress!"
3 months ago
But for databases I live in those
3 months ago
It might have just been a different service that railway didnt recognize as a standard "database"
3 months ago
compared to mongo/pg/mysql
3 months ago
which is funky but oh well!
3 months ago
Is it still uploading the sql dump?
3 months ago
Okay cool! Well, is that all for this thread haha?
well we fixed my database connection for sure ,by using a different database x)
3 months ago
Yeah thats still funky why the shell wasn't connecting on mariadb hmm. Something to remember
3 months ago
Answer <:picassoface:1398147502598918144>
3 months ago
If you said your SQL dump was ~3g and your volume only has 500mb yes you will.
3 months ago
Volume progress?
3 months ago
Theres a pretty good chance you reach the max with a dump that large unless I'm missing something.
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.
wtf even is this website having a freaking 3gb database ! i fkin hate wordpress
3 months ago
-# You and me both 😂
3 months ago
I believe so yes. I'm not sure if sql dumps resume or not.
3 months ago
Or if they clear progress if fail
3 months ago
Checks out that it would do that 😁
hmm should i just run the command again , or do i have to clean the database
3 months ago
I'd clean and run again to be safe
3 months ago
waiting
3 months ago
I'd just delete and restart yeah.
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 ?
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
3 months ago
does that make sense?
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 ?
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
but as u said it doesn't matter how much i allocated , what matter is how much i'm using
3 months ago
Yep! Usage based not allocation based
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 😁
3 months ago
Yay!
3 months ago
Am I good to close out this thread?
3 months ago
Happy to have helped <:picassoface:1398147502598918144>
Status changed to Solved noahd • 3 months ago
2 months ago
!s























