mysql8.0 caching_sha2_password image not found

Wang William (WJWang)
1 min readJul 26, 2018

--

root密碼的加密使用了caching_sha2_password plugin,然而mysql workbench 或是 sequelpro這樣的client軟體都找不到這樣的plugin

進入mysql shell 下 執行可以很明顯看到原因:

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: $A$005$_94d4m .J!h\?”Vf,DsPqpYP4w1VyGFPyHRWwjiZX6mcN9TF.xu2a6dZ8fY22
4 rows in set (0.00 sec)

目前解決方式

修改加密規則

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘password’ PASSWORD EXPIRE NEVER;

更新密碼 然後flush權限

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
FLUSH PRIVILEGES;

密碼重設

ALTER user ‘root’@’localhost’ identified by ‘{YOUR_PASSWORD}’;

--

--

No responses yet