欢迎光临
我们一直在努力

执行 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.

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

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。