mysqldump?

Is there a way to use railway cli to execute a mysql dump? I tried railway run with the appropriate variables from the ui but I can't see the correct data. Without specifying a database, it dumps system tables, if I try to specify database "railway" (as the ui suggests) I get "table not found" errors.
8 Replies
Percy
Percy2y ago
Project ID: b97a420c-bc3e-4bd6-89e8-a06b1e2176bd
Percy
Percy2y ago
You might find these helpful: - Services | Railway Docs
⚠️ experimental feature
gazhay
gazhay2y ago
b97a420c-bc3e-4bd6-89e8-a06b1e2176bd
Brody
Brody2y ago
screenshot of commands run so I can understand what you've tried
gazhay
gazhay2y ago
railway run mysqldump mysql -hcontainers-us-west-67.railway.app -uroot -p<redacted> --port 5721 --protocol=TCP railway
railway run mysqldump mysql -hcontainers-us-west-67.railway.app -uroot -p<redacted> --port 5721 --protocol=TCP railway
Brody
Brody2y ago
flags are being merged with their values, thats just a formatting error right?
gazhay
gazhay17mo ago
Shouldn't matter, (other than password flag)
railway run mysqldump mysql -h containers-us-west-67.railway.app -u root -p --port 5721 --protocol=TCP railway
railway run mysqldump mysql -h containers-us-west-67.railway.app -u root -p --port 5721 --protocol=TCP railway
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
mysqldump: Couldn't find table: "railway"
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
mysqldump: Couldn't find table: "railway"
railway run mysqldump mysql -h containers-us-west-67.railway.app -u root -p --port 5721 --protocol=TCP --databases railway
railway run mysqldump mysql -h containers-us-west-67.railway.app -u root -p --port 5721 --protocol=TCP --databases railway
also just dumps everything from database 'mysql' as below
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
--
-- Host: containers-us-west-67.railway.app Database: mysql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
--
-- Host: containers-us-west-67.railway.app Database: mysql
Just FYI I ended up writing an export script instead. May need to revisit this as I cannot get a full db backup through sequelize now and kinda need mysqldump to work.
Brody
Brody17mo ago
?
Want results from more Discord servers?
Add your server