码迷,mamicode.com
首页 > 数据库 > 详细

php artisan migrate时出现 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes解决办法

时间:2020-02-29 22:36:04      阅读:95      评论:0      收藏:0      [点我收藏+]

标签:ble   err   出现   too long   unicode   length   specified   pre   syn   

在测试队列中运用artisan命令行
php artisan queue:table

php artisan migrate时出现

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes



Change  database.php which is in config folder where it says

‘charset‘ => ‘utf8mb4‘, ‘collation‘ => ‘utf8mb4_unicode_ci‘, 

I changed these to

‘charset‘ => ‘utf8‘, ‘collation‘ => ‘utf8_unicode_ci‘,

 

php artisan migrate时出现 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes解决办法

标签:ble   err   出现   too long   unicode   length   specified   pre   syn   

原文地址:https://www.cnblogs.com/kangshuai/p/12386397.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!