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
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
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 
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
I’ve resolved by downgrading to MySQL 5.7.
Mariaex with MySQL 8.0 was just not working.







