kokolegorille

kokolegorille

Mariaex mysql 8+

Hello everyone,

Anyone having success using mariaex with mysql 8.0.x?

There is an open issue, but adding to my.cnf …

[mysqld]
default-authentication-plugin=mysql_native_password

… does not solve the problem. I still got this error when trying to create the repo.

12:27:42.618 [error] GenServer #PID<0.198.0> terminating
** (Mariaex.Error) (1251): Client does not support authentication protocol requested by server; consider upgrading MySQL client
    (db_connection) lib/db_connection/connection.ex:163: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
State: Mariaex.Protocol
** (Mix) The database for Ilox.Repo couldn't be created: (1251): Client does not support authentication protocol requested by server; consider upgrading MySQL client

The versions I use are

MacOSX High Sierra
Elixir 1.7.3 / OTP21
Phoenix 1.4 rc-01
Mysql 8.0.12
Ecto 2.2.1
Mariaex 0.8.4

Thanks for taking time

Marked As Solved

wojtekmach

wojtekmach

Hex Core Team

Could you check what’s the authentication plugin for the user you’re trying to log in as?

E.g.:

mysql> select user,plugin from mysql.user;
+------------------+-----------------------+
| user             | plugin                |
+------------------+-----------------------+
| mariaex_user     | mysql_native_password |
...

The default auth plugin for mysql 8.0 is caching_sha2_password and so if the user was created before you changed the default auth plugin that’s probably the issue.

Also Liked

kokolegorille

kokolegorille

That was it…

droping the user, and recreate allows me to create the Repo :slight_smile:

Thank You @wojtekmach

kokolegorille

kokolegorille

Oh, thanks… I got caching_sha2_password for my user…

mysql> select user,plugin from mysql.user;
+------------------+-----------------------+
| user             | plugin                |
+------------------+-----------------------+
| elixir           | caching_sha2_password |
| mysql.infoschema | caching_sha2_password |
| mysql.session    | caching_sha2_password |
| mysql.sys        | caching_sha2_password |
| root             | caching_sha2_password |
+------------------+-----------------------+

I will recreate a new user :slight_smile:

kokolegorille

kokolegorille

I think the syntax is

mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'localhost';
mysql> FLUSH PRIVILEGES;

The second command gives rights… You might change

  • newuser
  • password
  • ALL
  • *.*

Last Post!

tompave

tompave

I’ve resolved by downgrading to MySQL 5.7.
Mariaex with MySQL 8.0 was just not working.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
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
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New

Other popular topics Top

Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
jononomo
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement