I have a MariaDB server running in Docker Compose with hostname db. Trying to input gopher:gopher@db/gophercraft for the conn URL gives an error:
🧙🏿Please select a database backend
? choose a database backend mysql
🧙🏿You picked mysql as your database driver. Nice!
Next, you must enter a database URL. Database urls for mysql Look like this: user:password@/databaseName
? Enter a database URL. gopher:gopher@db/gophercraft
🧙🏿A fatal error has occured default addr for network 'db' unknown
When I wrap the hostname in tcp() as suggested here, it works. gopher:gopher@tcp(db)/gophercraft
Gophercraft will be deprecating the use of go-xorm very soon, in favor of the phylactery database. However, Phylactery might support mysql connections in future editions, so leaving this open for now.
I have a MariaDB server running in Docker Compose with hostname
db
. Trying to inputgopher:gopher@db/gophercraft
for the conn URL gives an error:When I wrap the hostname in
tcp()
as suggested here, it works.gopher:gopher@tcp(db)/gophercraft