新装的mysql 8.0.11,用mydumper连接发现连接不上,总是报错:
Error connecting to database: Authentication plugin ‘caching_sha2_password’ cannot be loaded:
/usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
进到数据库里面查看信息:
mysql> use mysql; Database changed mysql> select user, host, plugin, authentication_string from user \G *************************** 1. row *************************** user: mysql.infoschema host: localhost plugin: mysql_native_password authentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE *************************** 2. row *************************** user: mysql.session host: localhost plugin: mysql_native_password authentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE *************************** 3. row *************************** user: mysql.sys host: localhost plugin: mysql_native_password authentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE *************************** 4. row *************************** user: root host: localhost plugin: caching_sha2_password authentication_string: 4 rows in set (0.03 sec)
发现是因为”caching_sha2_password”的问题,只要改回”mysql_native_password”就可以了
修改第一步:
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘root’;
修改第二步:
在my.cnf配置文件中[mysqld]内设置默认为"mysql_native_password" # vim /etc/my.cnf [mysqld] default_authentication_plugin=mysql_native_password
Great blog here! Also your web site loads up fast! What host are you
using? Can I get your affiliate link to your host?
I wish my website loaded up as fast as yours lol
Hello there, just became alert to your blog through Google,
and found that it is really informative.
I am gonna watch out for brussels. I’ll appreciate if you continue this in future.
A lot of people will be benefited from your writing. Cheers!
WOW just what I was looking for. Came here by searching for info a
Excellent post. I absolutely love this site.
Keep it up!
It’s very trouble-free to find out any topic on net as compared to books, as
I found this paragraph at this site.
Keep this going please, great job!