by Devin Yang

建立於: 6年前 ( 更新: 6年前 )

在mysql 8.0.4之後,預設採用了一個新的驗證外掛caching_sha2_password。
如果我們的系統不支援這外掛怎麼辨?

我們可以簡單的變更使用者user改採用mysql_native_password,語法如下: (小寫user為使用者帳號)
ALTER USER user
IDENTIFIED WITH mysql_native_password
BY 'password';
或者,在建立一個新使用者時,採用
CREATE USER 'username'@'localhost' IDENTIFIED 
WITH mysql_native_password BY 'password';

Tags: mysql

Devin Yang

文章內容無法一一說明,如果您有什麼不了解處,歡迎提問哦:)

No Comment

Post your comment

需要登入才可留言!