gf icon indicating copy to clipboard operation
gf copied to clipboard

database/gdb: issue mysql driver cannot connect when using unix domain socket

Open bt-dev3 opened this issue 1 year ago • 0 comments

Go version

go version go1.21.0 linux/amd64

GoFrame version

v2.7.4

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

I using unix domain socket /tmp/mysql.sock connect to mysql, i catch the error. The Link like this: mysql:username:password@unix(/tmp/mysql.sock)/

What did you see happen?

I catch the error message below: dial unix /tmp/mysql.sock:: connect: no such file or directory and i check the driver source code, Determine that the problem is in both places.

in goframe file 1: database/gdb/gdb_core_config.go image

in github.com/gogf/gf/contrib/drivers/mysql/v2 file 2: mysql_open.go image

What did you expect to see?

please fix this bug.

bt-dev3 avatar Oct 17 '24 07:10 bt-dev3