错误一:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by '123456'' at line 1
错误二:
1045-Access denied for user 'root'@'localhost'
错误三:
Authentication plugin 'caching_sha2_password
全过程:
- 创建用户再赋予权限分两步走-否则出现错误一
- 创建账户:
create user 用户名@’ip地址’ identified by ‘密码’;
- 赋予权限:
grant all privileges on *.* to 用户名@’ip地址’ ;
(修改权限时在后面加with grant option)。
all privileges
表示所有权限,可以在mysql
数据库中的user
表中查看所有用户的信息,如下: