Skip to content

Commit

Permalink
add sql_log_off option to dsn
Browse files Browse the repository at this point in the history
  • Loading branch information
WithSoull committed Mar 4, 2025
1 parent dcdb179 commit 5a247bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/mysql/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (n *Node) GetDB() (*sqlx.DB, error) {
if n.done.Load() == 0 {
defer n.done.Store(1)
addr := util.JoinHostPort(n.host, n.config.MySQL.Port)
dsn := fmt.Sprintf("%s:%s@tcp(%s)/mysql?autocommit=1", n.config.MySQL.User, n.config.MySQL.Password, addr)
dsn := fmt.Sprintf("%s:%s@tcp(%s)/mysql?autocommit=1&sql_log_off=1", n.config.MySQL.User, n.config.MySQL.Password, addr)
if n.config.MySQL.SslCA != "" {
dsn += "&tls=custom"
}
Expand Down

0 comments on commit 5a247bd

Please sign in to comment.