由于mysql版本不同,以前授权,使用的是:
GRANT all privileges ON 数据库名.* TO 用户名@localhost identified BY '密码';
但是会报错:
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 "xxxx"' at line 1
现在使用:
grant all privileges on 数据库.* to 用户名@localhost;