R
Railway4mo ago
Pipenho

i forgot to pay account and now everithing is down

I need help to connect and make work all the start configurations and deploys how caan i do this?
37 Replies
Percy
Percy4mo ago
Project ID: 992cf34a-815d-4283-8440-0049e897a74e
Pipenho
PipenhoOP4mo ago
992cf34a-815d-4283-8440-0049e897a74e
Fragly
Fragly4mo ago
After you paid your bills, you just need to restart all the deployments
Pipenho
PipenhoOP4mo ago
already do it but the connection to database doesnt work
Fragly
Fragly4mo ago
What error are you getting?
Pipenho
PipenhoOP4mo ago
No description
Fragly
Fragly4mo ago
Does it fail to connect within your code as well?
Pipenho
PipenhoOP4mo ago
yep
Fragly
Fragly4mo ago
and you didn't change any of the variables or mess with the volume in any way?
Pipenho
PipenhoOP4mo ago
nop i just pay and redeploy everythind
Fragly
Fragly4mo ago
odd, what specific error in your code are you getting when you try to connect though?
Pipenho
PipenhoOP4mo ago
XHRGET https://dev-regatea-back-dev.up.railway.app/bargaines/recents?perpage=8&page=1 [HTTP/2 500 229ms]
success false code "ERR-500" message "Unexpected error from database adapter: select failed ("badConnection"). A connection either could not be obtained or there was an error using the connection.\nAdditional data:\n\n{\n error: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client\n at Sequence._packetToError (/app/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)\n at Handshake.ErrorPacket (/app/node_modules/mysql/lib/protocol/sequenc…ctions (node:internal/process/task_queues:95:5) {\n code: 'ER_NOT_SUPPORTED_AUTH_MODE',\n errno: 1251,\n sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',\n sqlState: '08004',\n fatal: true\n },\n meta: {\n host: 'localhost',\n port: 3306,\n schema: true,\n adapter: 'sails-mysql',\n url: 'mysql://root:[email protected]:32787/regatea_test',\n identity: 'default'\n }\n}" error Object { isOperational: true, adapterMethodName: "find", modelIdentity: "parameter", … }
Fragly
Fragly4mo ago
are you using the mysql npm package to make this connection?
Pipenho
PipenhoOP4mo ago
yep
Fragly
Fragly4mo ago
could you try using mysql2 instead? 🙏
Pipenho
PipenhoOP4mo ago
but thats not the problem event with mysql worbench i cant connect
Fragly
Fragly4mo ago
Alright, in that case could you try appending the following to your MySQL service start command:
--mysql-native-password=ON
--mysql-native-password=ON
-# (you can do this in your MySQL database-service's settings)
Pipenho
PipenhoOP4mo ago
No description
Pipenho
PipenhoOP4mo ago
seems that the connection with the database is break
Fragly
Fragly4mo ago
No no, you're not supposed to append it there, when you go to your database service, you need to click on Settings, then if you scroll down you'll find Custom start command, at the end of that custom start command, you just need to paste --mysql-native-password=ON
Fragly
Fragly4mo ago
No description
Pipenho
PipenhoOP4mo ago
oohhhh
Fragly
Fragly4mo ago
aand, did it work?
Pipenho
PipenhoOP4mo ago
Nop Any news?
Fragly
Fragly4mo ago
It's very strange, I'm completely out of ideas
Pipenho
PipenhoOP4mo ago
No description
Pipenho
PipenhoOP4mo ago
That could work?
Fragly
Fragly4mo ago
Here's what happened, you deployed your MySQL database before MySQL databases got pinned to a specific version. This means every time you redeploy it, it'll deploy the latest version. This caused you to jump from something in MySQL 8 to MySQL 9, and since MySQL 9 doesn't support that native password plugin, you're softlocked out of the database, at least from what I can tell
Pipenho
PipenhoOP4mo ago
What can i do? I cant connect to database lost connection to mysql server at 'reading initial communication packet' system error 0 this is the error now
Fragly
Fragly4mo ago
I might have an idea, the current issue is authentication. We could try: 1. adding --skip-grant-tables to the start command to disable authentication on the MySQL database 2. From there you can connect to the database and make a backup. 3. Then you could try making a new database and loading the backup onto the new database this would of course temporarily expose your database though, without any authentication anyone could connect to it if they know the URL but if you don't mind that then I think this could be worth trying (note: remove the --mysql-native-password=ON that we added last time first before trying this)
Pipenho
PipenhoOP4mo ago
thats an awful solution xD i need security also can go back to an older version?
Fragly
Fragly4mo ago
You wouldn't be able to downgrade the MySQL deployment You could tunnel through tailscale which would allow you to access the database without authentication with more security as it wouldn't be publicly exposed a railway team member is working on a guide for that, but it won't be done until the end of the week
Pipenho
PipenhoOP4mo ago
Can you send me updates of it Plz
Fragly
Fragly4mo ago
Sure, I can ping you when that guide is completed 🙂
Pipenho
PipenhoOP4mo ago
Awesome Thanks
Fragly
Fragly3mo ago
@Pipenho The tailscale guide was published: https://docs.railway.app/tutorials/set-up-a-tailscale-subnet-router I did do some testing and I couldn't manage to get it working, I had trouble connecting to the database without auth using the --skip-grant-tables flag However, it's very possible I just couldn't get it working due to ignorance (I don't use MySQL) so it might still be worth a shot since you're likely better at using MySQL than I am 🤣 If this doesn't work then I'm completely out of ideas 😭
Pipenho
PipenhoOP3mo ago
This could work with the basic plan? Use the flag for testing for now meanwhile a try to fix this
Want results from more Discord servers?
Add your server