求大神指点,PHP artisan migrate 执行报错:check the manual tha t corresponds to your MySQL server version for the right syntax to use near 'layouts character set utf8mb4 collate utf8mb4_unicode_ci'?

php artisan migrate执行错误结果为:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual tha
t corresponds to your MySQL server version for the right syntax to use near 'layouts character set utf8mb4 collate
utf8mb4_unicode_ci' at line 1 (SQL: create table migrations (id int unsigned not null auto_increment primary
key, migration varchar(191) not null, batch int not null) layouts character set utf8mb4 collate utf8mb4_unicod
e_ci
)
In Connection.php line 452:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual tha
t corresponds to your MySQL server version for the right syntax to use near 'layouts character set utf8 collate ut
f8_unicode_ci' at line 1;

这里的sql里为什么会多一个layouts?

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 2

检查一下你的数据库编码。

5年前 评论

您好!数据库是这样的:
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
我需要改编码吗?homestead账户下,配置文件改不了。不好意思,刚刚接触,谢谢帮助。

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!