Database creation fails with Authentication plugin 'caching_sha2_password' cannot be loaded
error.
Above error occurs when I run following command:
$ RAILS_ENV=test rake db:create
Error message:
Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql@5.6/5.6.46/lib/plugin/caching_sha2_password.so, 2): image not found
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>true, "pool"=>5, "socket"=>"/tmp/mysql.sock", "username"=>"root", "password"=>nil, "database"=>"ht_test"}, charset: utf8, collation: utf8_unicode_ci
(if you set the charset manually, make sure you have a matching collation)
I know other developers had similar issues with mysql@8.* . Thats why I switched to mysql@5.6
. Still I am facing this issue.
Please suggest possible solutions.
Thanks