1.问题描述:mysql 数据库名称或表名称中有中划线,在 使用 use databasesName 报错;
1064 - 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 '-zhyp.hk_ship TO 'haikou_sf'@'%'' at line 1
解决方案: `数据库名称`.`表名称`
2. 使用Navicat创建mysql用户
右键数据库 -> 命令列界面
CREATE USER 'haikou_sf'@'%' IDENTIFIED BY '123456'; GRANT SELECT ON shiyanshi-zhyp.hk_ship TO 'haikou_sf'@'%';