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 ‘root’
出现这样的错误的原因是因为新版的的mysql版本已经将创建账户和赋予权限的方式分开了。
解决方案是先创建用户后赋予权限:
创建账户:create user ‘用户名’@’访问主机’ identified by ‘密码’;
赋予权限:grant 权限列表 on 数据库 to ‘用户名’@’访问主机’ ;(修改权限时在后面加with grant option)
create user 'root'@'192.169.230.131' identified by 'root';
grant all on hive.* to 'root'@'192.168.230.131.' WITH GRANT OPTION;