# Mysql access

**URL:** <https://forum.elixirforum.com/t/mysql-access/29978>\
**Category:** Questions\
**Tags:** mysql\
**Created:** [March 21, 2020, 3:12pm UTC](https://forum.elixirforum.com/t/mysql-access/29978 "2020-03-21T15:12:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sribe](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@sribe](https://forum.elixirforum.com/u/sribe)\
**Post date:** [March 21, 2020, 3:12pm UTC](https://forum.elixirforum.com/t/mysql-access/29978/1 "2020-03-21T15:12:22Z")

</div>

I need simple access to a bit of data in MySQL (not my primary store), ecto not needed, something at the level of postgrex would be fine. Any suggestions re mariaex vs myxql vs ???

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [March 21, 2020, 6:36pm UTC](https://forum.elixirforum.com/t/mysql-access/29978/2 "2020-03-21T18:36:37Z")

</div>

MyXQL is newer and was worked on by Elixir and Ecto core team members. That’s what I use and had no problems (but then again I don’t use anything advanced in MySQL so take this with a grain of salt).

What’s the problem with using Ecto though? It always helped me and never has been in the way.

---

<div class="post-metadata">

**Author:** ![sribe](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@sribe](https://forum.elixirforum.com/u/sribe)\
**Post date:** [March 21, 2020, 6:49pm UTC](https://forum.elixirforum.com/t/mysql-access/29978/3 "2020-03-21T18:49:17Z")

</div>

> [@dimitarvp](#):
>
> What’s the problem with using Ecto though? It always helped me and never has been in the way.

I don’t want the mental/modeling overhead for a single query, which is literally all that I’ll every use this db for: a single `select * from foo where timestamp >=...`

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/32/38664_2.png) [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Post date:** [March 21, 2020, 6:51pm UTC](https://forum.elixirforum.com/t/mysql-access/29978/4 "2020-03-21T18:51:39Z")

</div>

> [@sribe](#):
>
> for a single query, which is literally all that I’ll every use this db for

Famous last words! :003:

For single usage, sure, I get you. But if I have like 5-10 queries at one point I’d immediately reach for Ecto.

---

<div class="post-metadata">

**Author:** ![sribe](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@sribe](https://forum.elixirforum.com/u/sribe)\
**Post date:** [March 21, 2020, 6:53pm UTC](https://forum.elixirforum.com/t/mysql-access/29978/5 "2020-03-21T18:53:36Z")

</div>

> [@dimitarvp](#):
>
> Famous last words!

LOL. Single table because it is the data output by a very specific piece of hardware which will never be capable of doing anything else 😉

---

<div class="post-metadata">

**Author:** ![cmkarlsson](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cmkarlsson/32/23000_2.png) [@cmkarlsson](https://forum.elixirforum.com/u/cmkarlsson)\
**Post date:** [March 22, 2020, 2:06am UTC](https://forum.elixirforum.com/t/mysql-access/29978/6 "2020-03-22T02:06:14Z")

</div>

Assuming your MySQL version is \>= 5.6 I’d use `MyXql`. That seems to be the “main” library going forward. I don’t know if mariaex is actively developed or not but last commit was end of 2018
