gf
gf copied to clipboard
database/gdb: issue mysql driver cannot connect when using unix domain socket
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
in github.com/gogf/gf/contrib/drivers/mysql/v2
file 2: mysql_open.go
What did you expect to see?
please fix this bug.