mysql数据库名称中包含短横线的对应方式

参考:https://blog.csdn.net/liumiaocn/article/details/89403642

mysql> GRANT ALL PRIVILEGES ON g-xxx.* TO 'test'@'%';
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 '-iam.* TO 'g-dev'@'%'' at line 1

修改成

GRANT ALL PRIVILEGES ON `g-xxx`.* TO 'test'@'%';

你可能感兴趣的:(mysql,mysql,big,data)