elixir-ecto / myxql

MySQL 5.5+ driver for Elixir
Apache License 2.0
273 stars 67 forks source link

MyXQL.Connection (#PID<0.394.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) address family not supported by protocol family - :eafnosup #157

Closed sysmat closed 2 years ago

sysmat commented 2 years ago
{MyXQL,
      host: "localhost",
      username: "******",
      database: "aris",
      password: "*****",
      name: :aris
    }
ex(1)> 
09:18:02.804 [error] MyXQL.Connection (#PID<0.394.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) address family not supported by protocol family - :eafnosupport
iex(1)> 
09:18:28.139 [error] MyXQL.Connection (#PID<0.394.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) address family not supported by protocol family - :eafnosupport
iex(1)> 
09:18:54.515 [error] MyXQL.Connection (#PID<0.394.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) address family not supported by protocol family - :eafnosupport
iex(1)> 
09:19:10.024 [error] MyXQL.Connection (#PID<0.394.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) address family not supported by protocol family - :eafnosupport
josevalim commented 2 years ago

Please use hostname: instead of host:. Otherwise it defaults to socket. :)

sysmat commented 2 years ago

@josevalim thx