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

时间:2019-04-28 11:44:41

标签: laravel-5.8

php artisan在执行时迁移错误

  

Illuminate \ Database \ Query异常:SQL STATE [42000]:语法错误或   访问冲突:1253 COLLATION'utf8_unicode_ci'对以下用户无效   字符集'utf8 8mb4'(SQL:select * from   information_schema.tables其中table_schema =仓库唱歌和   table_name =迁移)

1 个答案:

答案 0 :(得分:0)

您需要修改以下更改,

转到 config> database.php

'connections' => [
                  ....
                  'mysql' => [
                             ......
                             'charset' => 'utf8mb4', // Update here : 'utf8'
                             'collation' => 'utf8mb4_unicode_ci', // Update here : utf8_unicode_ci