MySQL 8.0 : Default authentication method fails
soegaard opened this issue · comments
I have a freshly installed MySQL 8.0 and have created a database using the terminal.
Now I am trying to connect to the database from racket.
I get the error:
../../../../../Applications/Racket v7.0/collects/db/private/generic/interfaces.rkt:209:0: mysql-connect: back end requested unsupported authentication plugin
plugin: "caching_sha2_password"
The MySQL documentation says:
In MySQL 8.0, caching_sha2_password is the default authentication plugin rather than mysql_native_password.
The reason is that mysql-connect
doesn't support other methods than mysql_native_password
.
In short: This is a feature request for support for the new default method.
In case others run into the same problem, here is how to create a database with legacy settings:
That was quick - Thanks!
racket connect mysql8.0 show error.
#lang racket (require db) (mysql-connect #:server "127.0.0.1" #:port 3306 #:database "test_db" #:user "root" #:password "root" #:ssl 'no)
I installed mysql8.0 and run up code show error :
mysql-connect: communication failure when: during authentication (caching_sha2_password)
I runed sql in mysql:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; FLUSH PRIVILEGES;
@imxingquan Thanks for the report! I've pushed a fix. It should be in the release candidate for 7.6 tomorrow.