dql7588
2018-04-20 20:49
浏览 108
已采纳

Laravel mysql迁移错误

I recently format my mac book pro, after cloning the proyect from github and install the things I need like MySql and Sequel Pro I tried to migrate the database information but I get this error:

   Illuminate\Database\QueryException  : SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' (SQL: select * from information_schema.tables where table_schema = fisica and table_name = migrations)

  Exception trace:

  1   PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'")

Versions:

Mysql 8.0.11

Laravel 5.6.12

PHP 7.1.14 (cli)

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=fisica
DB_USERNAME=xxx
DB_PASSWORD=xxx

I created the database from Sequel PRO GUI

图片转代码服务由CSDN问答提供 功能建议

我最近格式化了我的mac book pro,从github克隆了proyect并安装了我需要的东西,比如MySql和Sequel Pro我尝试迁移数据库信息,但是我收到此错误:</ p>

  Illuminate \ Database \ QueryException:SQLSTATE [42000]:语法错误或访问冲突:1231变量'sql_mode' 不能设置为'NO_AUTO_CREATE_USER'的值(SQL:select * from information_schema.tables where table_schema = fisica和table_name = migrations)
 
异常跟踪:
 
 1 PDOException ::(“SQLSTATE [42000]  ]:语法错误或访问冲突:1231变量'sql_mode'不能设置为'NO_AUTO_CREATE_USER'的值“”
 </ code> </ pre> 
 
 

版本:</ p>

Mysql 8.0.11 </ p>

Laravel 5.6.12 </ p>

PHP 7.1.14(cli)</ p>

 <代码> DB_CONNECTION = MySQL的
DB_HOST = 127.0.0.1 
DB_PORT = 3306 
DB_DATABASE = fisica 
DB_USERNAME = XXX 
DB_PASSWORD = XXX 
 </代码> </ PRE> 
 
 

我从Sequel P创建了数据库 RO GUI </ p> </ div>

5条回答 默认 最新

相关推荐 更多相似问题