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

需要登入才可留言!