[GH-ISSUE #175] 使用数据库连接时提示如下错误,请问是我的参数吗 #87

Closed
opened 2026-03-03 11:55:57 +03:00 by kerem · 1 comment
Owner

Originally created by @kss-noc on GitHub (Oct 11, 2022).
Original GitHub issue: https://github.com/Finb/bark-server/issues/175

如下
2022-10-11 17:51:59 INFO init apns client success...
2022-10-11 17:51:59 INFO load route [register_compat] success...
2022-10-11 17:51:59 INFO load route [misc] success...
2022-10-11 17:51:59 INFO load route [push] success...
2022-10-11 17:51:59 INFO load route [register] success...
2022-10-11 17:51:59 INFO load route [push_compat] success...
2022-10-11 17:51:59 FATAL failed to open database connection (bark-server:VWIAwgOSP5@127.0.0.1/bark-server): default addr for network '127.0.0.1' unknown
github.com/finb/bark-server/v2/database.NewMySQL
github.com/finb/bark-server/v2/database/mysql.go:30
main.main.func1
github.com/finb/bark-server/v2/main.go:180
github.com/urfave/cli/v2.(*App).RunContext
github.com/urfave/cli/v2@v2.11.1/app.go:386
github.com/urfave/cli/v2.(*App).Run
github.com/urfave/cli/v2@v2.11.1/app.go:251
main.main
github.com/finb/bark-server/v2/main.go:207
runtime.main
runtime/proc.go:250

Originally created by @kss-noc on GitHub (Oct 11, 2022). Original GitHub issue: https://github.com/Finb/bark-server/issues/175 如下 2022-10-11 17:51:59 INFO init apns client success... 2022-10-11 17:51:59 INFO load route [register_compat] success... 2022-10-11 17:51:59 INFO load route [misc] success... 2022-10-11 17:51:59 INFO load route [push] success... 2022-10-11 17:51:59 INFO load route [register] success... 2022-10-11 17:51:59 INFO load route [push_compat] success... 2022-10-11 17:51:59 FATAL failed to open database connection (bark-server:VWIAwgOSP5@127.0.0.1/bark-server): default addr for network '127.0.0.1' unknown github.com/finb/bark-server/v2/database.NewMySQL github.com/finb/bark-server/v2/database/mysql.go:30 main.main.func1 github.com/finb/bark-server/v2/main.go:180 github.com/urfave/cli/v2.(*App).RunContext github.com/urfave/cli/v2@v2.11.1/app.go:386 github.com/urfave/cli/v2.(*App).Run github.com/urfave/cli/v2@v2.11.1/app.go:251 main.main github.com/finb/bark-server/v2/main.go:207 runtime.main runtime/proc.go:250
kerem closed this issue 2026-03-03 11:55:57 +03:00
Author
Owner

@vayci commented on GitHub (Nov 7, 2022):

遇到了同样的问题,希望能对你有用
-dsn=root:VWIAwgOSP5@tcp(127.0.0.1:3306)/bark-server
或对括号转义
-dsn=root:VWIAwgOSP5@tcp\(127.0.0.1:3306\)/bark-server

<!-- gh-comment-id:1305028207 --> @vayci commented on GitHub (Nov 7, 2022): 遇到了同样的问题,希望能对你有用 `-dsn=root:VWIAwgOSP5@tcp(127.0.0.1:3306)/bark-server` 或对括号转义 ` -dsn=root:VWIAwgOSP5@tcp\(127.0.0.1:3306\)/bark-server`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bark-server#87
No description provided.