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

在测试队列中运用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',

 

posted @ 2020-02-29 21:48  骏码信息  阅读(458)  评论(0编辑  收藏  举报