R
Railwayβ€’9mo ago
malik

server error

Please tell me what I do it will solve it?
No description
No description
101 Replies
Percy
Percyβ€’9mo ago
Project ID: N/A
malik
malikβ€’9mo ago
Anyone here?
ThallesComH
ThallesComHβ€’9mo ago
are you using a Railway database?
malik
malikβ€’9mo ago
No
ThallesComH
ThallesComHβ€’9mo ago
then somehow your database is rejecting you access, confirm that your password and username are right
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
I check everything is ok
ThallesComH
ThallesComHβ€’9mo ago
mariadb by default only allows localhost connections. try to follow this tutorial
No description
malik
malikβ€’9mo ago
Why app crashed
malik
malikβ€’9mo ago
No description
ThallesComH
ThallesComHβ€’9mo ago
that's not enough info, send me your full logs
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
No description
ThallesComH
ThallesComHβ€’9mo ago
your sql client is trying to connect to localhost, make sure that you've set your database host
malik
malikβ€’9mo ago
Yes I set database host
ThallesComH
ThallesComHβ€’9mo ago
did you use env variable?
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
Yes
malik
malikβ€’9mo ago
No description
ThallesComH
ThallesComHβ€’9mo ago
as you see, you're using localhost
malik
malikβ€’9mo ago
Yes Local host is wrong?
ThallesComH
ThallesComHβ€’9mo ago
yes, your database is in another IP and please change your database credentials, you can't leak that to everybody
malik
malikβ€’9mo ago
Now I put cPanel IP address?
ThallesComH
ThallesComHβ€’9mo ago
and also, use environment variables to store your database credentials
malik
malikβ€’9mo ago
I will change it later ?
ThallesComH
ThallesComHβ€’9mo ago
well i don't know, is cPanel telling you your database IP?
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
I think this is ip address Dear what I do app not crashed and it's start
ThallesComH
ThallesComHβ€’9mo ago
it may be, never used cPanel. by the way, any reason to just not use Railway's database?
ThallesComH
ThallesComHβ€’9mo ago
malik
malikβ€’9mo ago
Now what I correct that my website is published?
ThallesComH
ThallesComHβ€’9mo ago
well, you'll need to change this accordingly to your database credentials
malik
malikβ€’9mo ago
Now I add MySQL database through railway Right?
ThallesComH
ThallesComHβ€’9mo ago
if you can ditch your cPanel database, then yes it's better to use Railway's database
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
My SQL is correct?
ThallesComH
ThallesComHβ€’9mo ago
yes, you can use MySQL
malik
malikβ€’9mo ago
I upload everything correct Then I don't know why app crashed?
ThallesComH
ThallesComHβ€’9mo ago
did you upload the sql dump to Railway?
malik
malikβ€’9mo ago
I want to upload my full website to railway Please help me how to solve 'app crashed' issue?
ThallesComH
ThallesComHβ€’9mo ago
im confused, did you migrated your database to Railway or you're still using the cPanel one?
malik
malikβ€’9mo ago
cPanel
ThallesComH
ThallesComHβ€’9mo 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
malikβ€’9mo ago
Ok wait I migrated to railway
malik
malikβ€’9mo 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
malikβ€’9mo ago
He use cPanel his method to I upload but no work He upload live and it's site Work
ThallesComH
ThallesComHβ€’9mo ago
do you mind helping him here? @Fragly need to work right now
Fragly
Fraglyβ€’9mo ago
I've never used cPanel either 😭
ThallesComH
ThallesComHβ€’9mo ago
he doesn't need that just guide him to setup a mariadb and connect that to their application
Fragly
Fraglyβ€’9mo ago
Oh Alright
malik
malikβ€’9mo ago
Hi please help
ThallesComH
ThallesComHβ€’9mo ago
*mysql
Fragly
Fraglyβ€’9mo ago
I already typed my guide out to use MariaDB and not MySQL πŸ’€ oh well, MySQL will be easier to explain
malik
malikβ€’9mo ago
Please now what I do?
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
I changed these 3 things from variable page now ok, and I deploy I can migrate to railway MySQL
Fragly
Fraglyβ€’9mo ago
oh yea you'd want to add the port variable too
malik
malikβ€’9mo ago
3000?
Fragly
Fraglyβ€’9mo ago
it's not necasserily 3000
Fragly
Fraglyβ€’9mo ago
You'll want to do this for MYSQLPORT as wel
No description
Fragly
Fraglyβ€’9mo ago
you're doing that in your MySQL service, you're supposed to do this on your main app
malik
malikβ€’9mo ago
All. Variable I fill .env
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
Now? I upload website then it's work?
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
I add on my website but it's not work Server error show App has been crashed
Fragly
Fraglyβ€’9mo ago
it doesn't look like you added anything in the screenshot you just sent
malik
malikβ€’9mo ago
No description
Fragly
Fraglyβ€’9mo ago
malik
malikβ€’9mo ago
No description
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo ago
I changed it but it no change
No description
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
It's still show railway
Fragly
Fraglyβ€’9mo ago
You're not supposed to change anything in the MySQL service this is the third time I'm saying this
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
Now I can not change anything from here App is Crashed always why?
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
Tell me solution of this
Fragly
Fraglyβ€’9mo ago
^
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
No suggestions
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo ago
I can not change anything You ask in above
Right + variable then click add reference I just followed it
Fragly
Fraglyβ€’9mo ago
Where are you trying to apply changes?
malik
malikβ€’9mo ago
Deploy
Fragly
Fraglyβ€’9mo ago
Like what service are you trying to add changes to?
malik
malikβ€’9mo ago
I just add these 4 service I just edited these 4 service to connect
No description
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo ago
Sorry sir now I understand I will correct and tell it to you
malik
malikβ€’9mo ago
No description
malik
malikβ€’9mo ago
No description
Fragly
Fraglyβ€’9mo ago
Like I said here, since you changed the variables for your MySQL service, you'll need to recreate the service
malik
malikβ€’9mo ago
I recreate
malik
malikβ€’9mo ago
No description
Fragly
Fraglyβ€’9mo 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
malikβ€’9mo 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β€’9mo ago
#πŸ›‚ο½œreadme #5
malik
malikβ€’9mo ago
Ok as you wish
Want results from more Discord servers?
Add your server