Gophercraft / core

GNU General Public License v3.0
10 stars 2 forks source link

Wizard DB URL fails without wrapping host name with `tcp()` #1

Open Kangaroux opened 3 months ago

Kangaroux commented 3 months ago

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

superp00t commented 3 months ago

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.