使用迁移的原因是在mysql中创建一个表

问题描述 投票:0回答:1

php artisan migrate执行时出错

Illuminate \ Database \ Query异常:SQL STATE [42000]:语法错误或访问冲突:1253 COLLATION'utf8_unicode_ci'对CHARACTER SET'utf8 8mb4'无效(SQL:select * from information_schema.tables where table_schema = warehousing sing and table_name =迁移)

laravel-5.8
1个回答
0
投票

您需要修改以下更改,

转到config> database.php

'connections' => [
                  ....
                  'mysql' => [
                             ......
                             'charset' => 'utf8mb4', // Update here : 'utf8'
                             'collation' => 'utf8mb4_unicode_ci', // Update here : utf8_unicode_ci  
© www.soinside.com 2019 - 2024. All rights reserved.