執行 php artisan migrate:install報錯

執行 php artisan migrate:install

報錯:
 SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CRE****ATE_USER' (S  
  QL: create table `migrations` (`id` int unsigned not null auto_increment primary key, `migration` varchar(255) not null, `batch`   
  int not null) default character set utf8mb4 collate utf8mb4_unicode_ci) 

解決方法是:
laravel54\config\database.php
修改代碼中的 strict 值修改成 false.
執行  php artisan migrate:install報錯

再次執行結果:
[root@test laravel54]# php artisan migrate:install
Migration table created successfully.
[root@test laravel54]#

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章