数据库名为dts-shop,赋权限时出现上述错误 GRANT ALL privileges ON dts-shop.* TO 'dtsshop'@'%';
GRANT ALL privileges ON dts-shop.* TO 'dtsshop'@'%';
再确认各种因素后感觉是数据库名不太符合规范,一查果然是,-属于mysql特殊字符,还有像 + - * \ & <> @ !% 也是,所以转义一下就好了
-
+ - * \ & <> @ !%
grant all privileges ondts-shop.* to 'dtsshop'@'%';
grant all privileges on
.* to 'dtsshop'@'%';