0

I am using the MyXQL driver with Ecto in Phoenix, and am trying to connect to an already existing MySQL database running on a Debian 11 server.

I can access the server normally using mysql -p, and can access it through Express (which is what I was using before I started migrating to Phoenix / Elixir).

When I try to run:

{ :ok, pid } = MyXQL.start_link([ username: "{username}", password: "{password}" ])

I get an error that reads:

[error] MyXQL.Connection (#PID<0.449.0>) failed to connect: ** (DBConnection.ConnectionError) (/tmp/mysql.sock) no such file or directory - :enoent

I understand that this means it can't find a /tmp/mysql.sock socket, however I cannot figure out how to fix this error, or why it even is an error, considering ExpressJS can access the server (using the npm package mysql).

Basil
  • 488
  • 1
  • 15

0 Answers0