看一下问题图片:

mysql 8.0.11 中使用 grant ... identified by 时 error 1064 near 'identified by '密码'' at line 1

1 问题:

当使用 grant 权限列表 on 数据库 to '用户名'@'访问主机' identified by '密码'; 时会出现"......near 'identified by '密码'' at line 1"这个错误

2 原因:

因为新版的的mysql版本已经将创建账户和赋予权限的方式分开了

3解决办法:

创建账户:create user '用户名'@'访问主机' identified by '密码';

赋予权限:grant 权限列表 on 数据库 to '用户名'@'访问主机' ;(修改权限时在后面加with grant option)

 

相关文章:

  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2021-10-18
相关资源
相似解决方案