How to connect R to MySQL? Failed to connect to database: Error: Plugin caching_sha2_password could not be loaded

让人想犯罪 __ 提交于 2019-12-04 09:29:25

The R mysql library depends on libmysqlclient/libmariadbclient. The missing caching_sha2_password seems to be an indicator that an old mysqlclient version or a libmariadbclient isn't installed. Only very recently did caching_sha2_password get added to mariadb (3.0.8)

An alternative, like this answer, is to change the user in mysql to use a different authentication mechanism:

You set the user back to mysql_native_password:

ALTER USER 'username'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'password'

To make this the default for all newly created users change the my.cnf/my.ini setting default_authentication_plugin=mysql_native_password

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!