wmnnd
Mariaex Handshake Error with Azure Database for MySQL
Hey there,
I’ve just been toying around with MS Azure a bit and I’ve been unable to connect to an Azure Database for MySQL server with Ecto/Mariaex.
When I try launch my application or run migrations, it crashes with the following error message:
09:44:48.179 [error] GenServer #PID<0.175.0> terminating
** (FunctionClauseError) no function clause matching in Mariaex.Messages.decode_msg/2
(mariaex) lib/mariaex/messages.ex:261: Mariaex.Messages.decode_msg(<<254, 109, 121, 115, 113, 108, 95, 110, 97, 116, 105, 118, 101, 95, 112, 97, 115, 115, 119, 111, 114, 100, 0, 51, 30, 66, 85, 81, 127, 123, 34, 125, 97, 115, 105, 99, 4, 34, 102, 93, 10, 30, 84, 0>>, :handshake_send)
(mariaex) lib/mariaex/messages.ex:225: Mariaex.Messages.decode/2
(mariaex) lib/mariaex/protocol.ex:1102: Mariaex.Protocol.msg_decode/2
(mariaex) lib/mariaex/protocol.ex:1070: Mariaex.Protocol.msg_recv/3
(mariaex) lib/mariaex/protocol.ex:155: Mariaex.Protocol.handshake_recv/2
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: nil
State: Mariaex.Protocol
** (exit) exited in: :gen_server.call(#PID<0.175.0>, {:checkout, #Reference<0.2452934895.1515978754.176436>, true, :infinity}, 5000)
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in Mariaex.Messages.decode_msg/2
(mariaex) lib/mariaex/messages.ex:261: Mariaex.Messages.decode_msg(<<254, 109, 121, 115, 113, 108, 95, 110, 97, 116, 105, 118, 101, 95, 112, 97, 115, 115, 119, 111, 114, 100, 0, 51, 30, 66, 85, 81, 127, 123, 34, 125, 97, 115, 105, 99, 4, 34, 102, 93, 10, 30, 84, 0>>, :handshake_send)
(mariaex) lib/mariaex/messages.ex:225: Mariaex.Messages.decode/2
(mariaex) lib/mariaex/protocol.ex:1102: Mariaex.Protocol.msg_decode/2
(mariaex) lib/mariaex/protocol.ex:1070: Mariaex.Protocol.msg_recv/3
(mariaex) lib/mariaex/protocol.ex:155: Mariaex.Protocol.handshake_recv/2
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
(db_connection) lib/db_connection/poolboy.ex:112: DBConnection.Poolboy.checkout/3
(db_connection) lib/db_connection.ex:920: DBConnection.checkout/2
(db_connection) lib/db_connection.ex:742: DBConnection.run/3
(db_connection) lib/db_connection.ex:1133: DBConnection.run_meter/3
(db_connection) lib/db_connection.ex:584: DBConnection.prepare_execute/4
(ecto) lib/ecto/adapters/mysql/connection.ex:22: Ecto.Adapters.MySQL.Connection.execute/4
(ecto) lib/ecto/adapters/sql.ex:243: Ecto.Adapters.SQL.sql_call/6
(ecto) lib/ecto/adapters/sql.ex:193: Ecto.Adapters.SQL.query!/5
I haven’t been able to look too much into it but it seems that the binary string is a response from the MySQL server; the binary in the error message begins with << 254 >> (as seems to be expected by Mariaex) and then continues with the string mysql_native_password.
If anyone has come across this issue before I’d be interested in how they resolved it before I spend hours trying to troubleshoot it further ![]()
Popular in Questions
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hello everyone,
I try to use an Javascript Event Handler in my root.html.leex file.
Therefore I created a function in the app.js file: ...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Hi,
is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
How to bind a phoenix app to a specific ip address?
could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function:
-dialyzer...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Other popular topics
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
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
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









