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
  • *.*
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

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
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 record...
New
tduccuong
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement