创建数据库时报错
CREATE DATABASE laravel-shop DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci;
该 sql 会报错: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 '-shop DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci' at line 1
这一句中的
laravel-shop
不合法 教程中使用的数据库名应该更改为laravel_shop
推荐文章: