erix
Adapter Ecto.Adapters.Mariaex was not compiled
I am new to Elixir, so to learn I’m converting an existing NodeJS project into an Elixir one.
I intend to use plain Elixir (no frameworks), Poison (for JSON I/O), MySQL (database).
My mix dependencies:
[
{:ecto_sql, "~> 3.2"},
{:poison, "~> 5.0"},
{:myxql, "~> 0.6.0"}
]
I followed instructions regarding PostgreSQL on StackOverflow and entered command mix deps.clean --all and then mix do deps.get, compile which results in:
** (ArgumentError) adapter Ecto.Adapters.Mariaex was not compiled, ensure it is correct and it is included as a project dependency
(ecto 3.11.1) lib/ecto/repo/supervisor.ex:61: Ecto.Repo.Supervisor.compile_config/2
lib/mysql.ex:2: (module)
I tried adding Mariaex to the dependencies:
[
{:ecto_sql, "~> 3.2"},
{:poison, "~> 5.0"},
{:myxql, "~> 0.6.0"},
{:mariaex, ">= 0.0.0"}
]
and the result was:
Because "mariaex >= 0.9.0-rc.0" depends on "decimal ~> 1.2" and "mariaex < 0.9.0-rc.0" depends on "decimal ~> 1.0", "mariaex" requires "decimal ~> 1.0".
And because "poison >= 5.0.0" depends on "decimal ~> 2.0", "poison >= 5.0.0" is incompatible with "mariaex".
And because "your app" depends on "mariaex >= 0.0.0", "poison >= 5.0.0" is forbidden.
So, because "your app" depends on "poison ~> 5.0", version solving failed.
** (Mix) Hex dependency resolution failed
I tried removing versions in dependencies:
[
{:ecto_sql, ">= 0.0.0"},
{:poison, ">= 0.0.0"},
{:myxql, ">= 0.0.0"},
{:mariaex, ">= 0.0.0"}
]
and got:
Because "mariaex >= 0.9.0-rc.0" depends on "decimal ~> 1.2" and "mariaex < 0.9.0-rc.0" depends on "decimal ~> 1.0", "mariaex" requires "decimal ~> 1.0".
And because "the lock" specifies "decimal 2.1.1", "the lock" is incompatible with "mariaex".
And because "your app" depends on "the lock", no version of "mariaex" is allowed.
So, because "your app" depends on "mariaex >= 0.0.0", version solving failed.
** (Mix) Hex dependency resolution failed
Is a connection between Ecto and MySQL even possible? What am I missing?
Trending in Questions
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated!
To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead.
Sta...
New
Hello !
We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New
Other Trending Topics
I had a lot of back and forth with Codex CLI & GPT 5.6 Sol to use a SWAR optimization in URI module.
I now have a version that on my...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #elixirconf-us
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex











First 4 of 4 Posts!
erix
Adding my question here, put things into perspective.
I have a file named
mysql.exin my lib folder, with then contents:because I use
Cc.Mysqlto interact with the database.Changing to:
fixed all the errors.
erix
Well.. it fixed the compile errors.
Now I’m faced with a new error. Following the instructions on MyXQL Github README.md I entered the first test command:
iex(1)> {:ok, pid} = MyXQL.start_link(username: "root")and got the following result:
I am using MySQL 8.1 server from the MySQL site, installed on Win11. The bin is in PATH. What am I missing?
wojtekmach
As you can see from the error message, MyXQL is trying to connect using UNIX socket at /tmp/mysql.sock. You probably want to connect over the network instead, either set
protocol: :tcpor explicitly set the hostname:hostname: "localhost"(which impliesprotocol: :tcp)erix
Thanks @wojtekmach.
I modified the command to:
{:ok, pid} = MyXQL.start_link(username: "ecto", password: "ecto", protocol: :tcp)and the connection was established.