我的用户名和密码都设置的为happymall,数据库名字为mmall。
这是我的插入代码:
grant all privileges on mmall.* to happymall@localhost identified by 'happymall';
报错:
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 'happymall'' at line 1
grant all privileges on mmall.* to 'happymall'@'%' identified by 'happymall';
报错:
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 'happymall'' at line 1
它提示了书写错误实在‘identified by ‘happymall’’附近,我猜测是mysql版本不同导致这个问题,但是上网查找了发现大家都是给的这个代码。
不知道我的问题出现在哪里,希望老师解答。