mysql 赋给用户权限 grant all privileges on

  • Post author:
  • Post category:mysql


遇到了 SQLException: access denied for  @’localhost’ (using password: no)

解决办法

grant all privileges on *.* to



joe@localhost



identified by ‘1’;


flush privileges;

拿  joe    1 登陆

附:

mysql>

grant 权限1,权限2,…权限n on





数据库





名称.表名称 to ‘用户名’@’用户地址’ identified by ‘连接口令’;




用户名 和 用户地址 一定要加 ‘ ’ 单引号!