raii6926
raii6926
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
hi when i see deploy log it say : Starting Container 2024/07/11 19:21:40 MYSQLUSER: 2024/07/11 19:21:40 MYSQLPASSWORD: 2024/07/11 19:21:40 MYSQLHOST: 2024/07/11 19:21:40 MYSQLPORT: 2024/07/11 19:21:40 MYSQLDATABASE: 2024/07/11 19:21:40 /app/database/db.go:44 [error] failed to initialize database, got error dial tcp :0: connect: connection refused 2024/07/11 19:21:40 DB Connection Error:dial tcp :0: connect: connection refused the print not give the key from my .env its that the problem?
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
i change be like this : databaseURL := os.Getenv("DATABASE_URL") var dsn string if databaseURL != "" { dsn = databaseURL } else { dbUsername := os.Getenv("MYSQLUSER") dbPassword := os.Getenv("MYSQLPASSWORD") dbHost := os.Getenv("MYSQLHOST") dbPort := os.Getenv("MYSQLPORT") dbName := os.Getenv("MYSQLDATABASE") // Debug prints to verify environment variables log.Println("MYSQLUSER:", dbUsername) log.Println("MYSQLPASSWORD:", dbPassword) log.Println("MYSQLHOST:", dbHost) log.Println("MYSQLPORT:", dbPort) log.Println("MYSQLDATABASE:", dbName) // Construct the DSN from individual environment variables dsn = dbUsername + ":" + dbPassword + "@tcp(" + dbHost + ":" + dbPort + ")/" + dbName + "?charset=utf8mb4&parseTime=True&loc=Local" } db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) if err != nil { log.Fatal("DB Connection Error:", err) } its that okey?
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
what is an example of a database url format ?
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
so why the log in railways always say : [error] failed to initialize database, got error dial tcp :0: connect: connection refused 2024/07/11 19:06:42 DB Connection Errordial tcp :0: connect: connection refused container event container died
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
its okey
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
2024/07/12 02:11:05 MYSQLUSER: root 2024/07/12 02:11:05 MYSQLPORT: 32847 2024/07/12 02:11:05 MYSQLDATABASE: railway
14 replies
RRailway
Created by raii6926 on 7/11/2024 in #✋|help
connection refused
ok, that the file of db
14 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
oh I understand, okay I've done it. thanks for helping
17 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
and once again I want to ask that the data in the previous database was not deleted, right?
17 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
No description
17 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
so I don't have to do anything? and the data is not lost, right?
17 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
So later when I migrate, I will update it myself based on the script provided? sorry I don't understand what that means
17 replies
RRailway
Created by raii6926 on 1/16/2024 in #✋|help
Railway Database V2
907aed4f-2054-4e42-86c8-5dc2e7f17511
17 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
okey i get it
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
My main question is already working, thank you. I think I will deploy on the railway again and if there are any questions I apologize for asking again here. Thank You
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
No description
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
No description
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
can i ask one more question?
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
i see, okay thank you brody
30 replies
RRailway
Created by raii6926 on 12/10/2023 in #✋|help
Error: Docker build failed with go
No description
30 replies