R
Railwayβ€’10mo ago
malik

server error

Please tell me what I do it will solve it?
No description
No description
101 Replies
Percy
Percyβ€’10mo ago
Project ID: N/A
malik
malikOPβ€’10mo ago
Anyone here?
ThallesComH
ThallesComHβ€’10mo ago
are you using a Railway database?
malik
malikOPβ€’10mo ago
No
ThallesComH
ThallesComHβ€’10mo ago
then somehow your database is rejecting you access, confirm that your password and username are right
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
I check everything is ok
ThallesComH
ThallesComHβ€’10mo ago
mariadb by default only allows localhost connections. try to follow this tutorial
No description
malik
malikOPβ€’10mo ago
Why app crashed
malik
malikOPβ€’10mo ago
No description
ThallesComH
ThallesComHβ€’10mo ago
that's not enough info, send me your full logs
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
No description
ThallesComH
ThallesComHβ€’10mo ago
your sql client is trying to connect to localhost, make sure that you've set your database host
malik
malikOPβ€’10mo ago
Yes I set database host
ThallesComH
ThallesComHβ€’10mo ago
did you use env variable?
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
Yes
malik
malikOPβ€’10mo ago
No description
ThallesComH
ThallesComHβ€’10mo ago
as you see, you're using localhost
malik
malikOPβ€’10mo ago
Yes Local host is wrong?
ThallesComH
ThallesComHβ€’10mo ago
yes, your database is in another IP and please change your database credentials, you can't leak that to everybody
malik
malikOPβ€’10mo ago
Now I put cPanel IP address?
ThallesComH
ThallesComHβ€’10mo ago
and also, use environment variables to store your database credentials
malik
malikOPβ€’10mo ago
I will change it later ?
ThallesComH
ThallesComHβ€’10mo ago
well i don't know, is cPanel telling you your database IP?
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
I think this is ip address Dear what I do app not crashed and it's start
ThallesComH
ThallesComHβ€’10mo ago
it may be, never used cPanel. by the way, any reason to just not use Railway's database?
ThallesComH
ThallesComHβ€’10mo ago
malik
malikOPβ€’10mo ago
Now what I correct that my website is published?
ThallesComH
ThallesComHβ€’10mo ago
well, you'll need to change this accordingly to your database credentials
malik
malikOPβ€’10mo ago
Now I add MySQL database through railway Right?
ThallesComH
ThallesComHβ€’10mo ago
if you can ditch your cPanel database, then yes it's better to use Railway's database
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
My SQL is correct?
ThallesComH
ThallesComHβ€’10mo ago
yes, you can use MySQL
malik
malikOPβ€’10mo ago
I upload everything correct Then I don't know why app crashed?
ThallesComH
ThallesComHβ€’10mo ago
did you upload the sql dump to Railway?
malik
malikOPβ€’10mo ago
I want to upload my full website to railway Please help me how to solve 'app crashed' issue?
ThallesComH
ThallesComHβ€’10mo ago
im confused, did you migrated your database to Railway or you're still using the cPanel one?
malik
malikOPβ€’10mo ago
cPanel
ThallesComH
ThallesComHβ€’10mo ago
ok, so try this credentials if it doesn't work, try to find it in your cPanel dashboard can't help much because as I said, never used cPanel
malik
malikOPβ€’10mo ago
Ok wait I migrated to railway
malik
malikOPβ€’10mo ago
CODEMASTER
YouTube
How to Install daman Game | daman game ka installation kaise kare |...
How to Install daman Game | daman game ka installation kaise kare | How to install nodejs for daman WhatsApp number πŸ‘‰7087902758βœ… if you want to create your own Colour Prediction website then contact us we provide best script in cheap prices WhatsApp link :- 7087902758 How To Create Colour Prediction Game Website in Hindi. How To Download Colo...
malik
malikOPβ€’10mo ago
He use cPanel his method to I upload but no work He upload live and it's site Work
ThallesComH
ThallesComHβ€’10mo ago
do you mind helping him here? @Fragly need to work right now
Fragly
Fraglyβ€’10mo ago
I've never used cPanel either 😭
ThallesComH
ThallesComHβ€’10mo ago
he doesn't need that just guide him to setup a mariadb and connect that to their application
Fragly
Fraglyβ€’10mo ago
Oh Alright
malik
malikOPβ€’10mo ago
Hi please help
ThallesComH
ThallesComHβ€’10mo ago
*mysql
Fragly
Fraglyβ€’10mo ago
I already typed my guide out to use MariaDB and not MySQL πŸ’€ oh well, MySQL will be easier to explain
malik
malikOPβ€’10mo ago
Please now what I do?
Fragly
Fraglyβ€’10mo ago
I'm happy to πŸ™‚ To deploy MariaDB in your app you'd want to follow these steps: 1. go to your project in Railway's dashboard 2. Right Click t add a new service 3. Click on Database 4. Select MySQL 5. Click on Deploy if you see that option If you've followed these steps correctly, you'll see a MySQL service in your app now you'll want to connect to MySQL, we'll do this with Reference Variables in your main app, go to the variable page and click on + New Variable on the right, you'll see a v Add Reference button, click on that then click on MYSQLHOST you'll want to repeat this for mysql user, database and password After doing that, you'll have reference variables to all the authentication values required to connect to MySQL Finally, you'll just want to connect to MySQL using these environment variables
const connection = mysql.createPool({
host: process.env.MYSQLHOST,
user: process.env.MYSQLUSER,
... // etc etc
})
const connection = mysql.createPool({
host: process.env.MYSQLHOST,
user: process.env.MYSQLUSER,
... // etc etc
})
If you've done all this correctly, you should now be able to connect to the MySQL database in your app few caveats: 1. this uses public networking
I couldn't find any info on how to use a full connection string to createPool on MySQL but in the future you might want to look into how to use private networking for this
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
I changed these 3 things from variable page now ok, and I deploy I can migrate to railway MySQL
Fragly
Fraglyβ€’10mo ago
oh yea you'd want to add the port variable too
malik
malikOPβ€’10mo ago
3000?
Fragly
Fraglyβ€’10mo ago
it's not necasserily 3000
Fragly
Fraglyβ€’10mo ago
You'll want to do this for MYSQLPORT as wel
No description
Fragly
Fraglyβ€’10mo ago
you're doing that in your MySQL service, you're supposed to do this on your main app
malik
malikOPβ€’10mo ago
All. Variable I fill .env
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
Now? I upload website then it's work?
Fragly
Fraglyβ€’10mo ago
the screenshot you sent is a screenshot of your MySQL service you were supposed to add these service variables to your website's service, not MySQL if you added these variables on your MySQL service then you'll want to recreate your MySQL service since you basically destroyed the variables
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
I add on my website but it's not work Server error show App has been crashed
Fragly
Fraglyβ€’10mo ago
it doesn't look like you added anything in the screenshot you just sent
malik
malikOPβ€’10mo ago
No description
Fragly
Fraglyβ€’10mo ago
malik
malikOPβ€’10mo ago
No description
Fragly
Fraglyβ€’10mo ago
Make sure you followed this guide correctly From what I understand, you added those variables in your MySQL service if you did that, you'd want to recreate your MySQL service since you destroyed the variables
malik
malikOPβ€’10mo ago
I changed it but it no change
No description
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
It's still show railway
Fragly
Fraglyβ€’10mo ago
You're not supposed to change anything in the MySQL service this is the third time I'm saying this
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
Now I can not change anything from here App is Crashed always why?
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
Tell me solution of this
Fragly
Fraglyβ€’10mo ago
^
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
No suggestions
Fragly
Fraglyβ€’10mo ago
You're not supposed to change anything in your MySQL service, you're supposed to follow these steps in your main app, your website's service this is the fourth time I've told you this :SMH:
malik
malikOPβ€’10mo ago
I can not change anything You ask in above
Right + variable then click add reference I just followed it
Fragly
Fraglyβ€’10mo ago
Where are you trying to apply changes?
malik
malikOPβ€’10mo ago
Deploy
Fragly
Fraglyβ€’10mo ago
Like what service are you trying to add changes to?
malik
malikOPβ€’10mo ago
I just add these 4 service I just edited these 4 service to connect
No description
Fragly
Fraglyβ€’10mo ago
You're not supposed to add these variables to the MySQL service You're supposed to add these variables in your website's service this is the fifth time I'm telling you this We're going in circles here, please read what I am telling you
malik
malikOPβ€’10mo ago
Sorry sir now I understand I will correct and tell it to you
malik
malikOPβ€’10mo ago
No description
malik
malikOPβ€’10mo ago
No description
Fragly
Fraglyβ€’10mo ago
Like I said here, since you changed the variables for your MySQL service, you'll need to recreate the service
malik
malikOPβ€’10mo ago
I recreate
malik
malikOPβ€’10mo ago
No description
Fragly
Fraglyβ€’10mo ago
so you deleted the service, and then made a new service? also make sure you followed all the steps here https://discord.com/channels/713503345364697088/1204738443905728533/1204787906959638609 including the last one
malik
malikOPβ€’10mo ago
Ok Sir same error Command not found /bin/bash: line 1: docker-entrypoint.sh: command not found But bash name no files available in my website source code Please help @Fragly @ThallesComH ? Anyone here?? @Brody ??
Brody
Brodyβ€’10mo ago
#πŸ›‚ο½œreadme #5
malik
malikOPβ€’10mo ago
Ok as you wish
Want results from more Discord servers?
Add your server