Py学习  »  Vitah  »  全部回复
回复总数  1

您应该这样打开:

db, err := sql.Open("mysql", "root:root@tcp(mysql:3306)/GoLife")

mysql 是Docker编写服务名。