最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

laravel執(zhí)行php artisan migrate報錯的解決方法

 更新時間:2019年10月09日 09:50:59   作者:_吳慧良  
今天小編就為大家分享一篇laravel執(zhí)行php artisan migrate報錯的解決方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

報錯一

$ php artisan migrate
 
 Illuminate\Database\QueryException : could not find driver (SQL: select * fr
om information_schema.tables where table_schema = dev_oms and table_name = migra
tions)
 
 at D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection.
php:664
 660|   // If an exception occurs when attempting to run a query, we'll
 format the error
 661|   // message to include the bindings with SQL, which will make th
is exception a
 662|   // lot more helpful to the developer instead of just the databa
se's errors.
 663|   catch (Exception $e) {
 > 664|    throw new QueryException(
 665|     $query, $this->prepareBindings($bindings), $e
 666|    );
 667|   }
 668|
 
 Exception trace:
 
 1 PDOException::("could not find driver")
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connectors
\Connector.php:68
 
 2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=dev_oms", "root",
"root", [])
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connectors
\Connector.php:68
 
 Please use the argument -v to see more details.

原因是php.ini 擴(kuò)展"php_pdo_mysql.dll"沒開啟

報錯二

$ php artisan migrate
Migration table created successfully.
 
 Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access
 violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: a
lter table `users` add unique `users_email_unique`(`email`))
 
 at D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection.
php:664
 660|   // If an exception occurs when attempting to run a query, we'll
 format the error
 661|   // message to include the bindings with SQL, which will make th
is exception a
 662|   // lot more helpful to the developer instead of just the databa
se's errors.
 663|   catch (Exception $e) {
 > 664|    throw new QueryException(
 665|     $query, $this->prepareBindings($bindings), $e
 666|    );
 667|   }
 668|
 Exception trace:
 1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp
ecified key was too long; max key length is 767 bytes")
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458
 2 PDOStatement::execute()
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458
 Please use the argument -v to see more details.

數(shù)據(jù)庫編碼改為utf8mb4

報錯三

$ php artisan migrate
Migration table created successfully.
 
 Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access
 violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: a
lter table `users` add unique `users_email_unique`(`email`))
 
 at D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection.
php:664
 660|   // If an exception occurs when attempting to run a query, we'll
 format the error
 661|   // message to include the bindings with SQL, which will make th
is exception a
 662|   // lot more helpful to the developer instead of just the databa
se's errors.
 663|   catch (Exception $e) {
 > 664|    throw new QueryException(
 665|     $query, $this->prepareBindings($bindings), $e
 666|    );
 667|   }
 668|
 Exception trace:
 1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp
ecified key was too long; max key length is 767 bytes")
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458
 2 PDOStatement::execute()
  D:\WWW\dev_oms\vendor\laravel\framework\src\Illuminate\Database\Connection
.php:458
 Please use the argument -v to see more details.

加上兩行代碼即可

以上這篇laravel執(zhí)行php artisan migrate報錯的解決方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • PHP函數(shù)引用返回的實例詳解

    PHP函數(shù)引用返回的實例詳解

    其實PHP函數(shù)引用與php中變量引用一樣,都使用的是&符號了,那么今天我們就一起來看看函數(shù)的引用返回的一些例子,有需要的朋友們可以參考借鑒,下面來一起看看吧。
    2016-09-09
  • ThinkPHP之用戶注冊登錄留言完整實例

    ThinkPHP之用戶注冊登錄留言完整實例

    這篇文章主要介紹了ThinkPHP之用戶注冊登錄留言完整實例,有助于詳細(xì)了解ThinkPHP的運(yùn)作流程,需要的朋友可以參考下
    2014-07-07
  • 在laravel框架中使用model層的方法

    在laravel框架中使用model層的方法

    今天小編就為大家分享一篇在laravel框架中使用model層的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2019-10-10
  • php生成靜態(tài)html頁面的方法(2種方法)

    php生成靜態(tài)html頁面的方法(2種方法)

    在PHP網(wǎng)站開發(fā)中為了網(wǎng)站推廣和SEO等需要,需要對網(wǎng)站進(jìn)行全站或局部靜態(tài)化處理,PHP生成靜態(tài)HTML頁面有多種方法,比如利用PHP模板、ob系列的函數(shù),本文給大家分享php生成靜態(tài)html頁面的方法(2種方法),感興趣的朋友跟著小編一起學(xué)習(xí)學(xué)習(xí)吧
    2015-09-09
  • laravel validate 設(shè)置為中文的例子(驗證提示為中文)

    laravel validate 設(shè)置為中文的例子(驗證提示為中文)

    今天小編就為大家分享一篇laravel validate 設(shè)置為中文的例子(驗證提示為中文),具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2019-09-09
  • PHP將amr音頻文件轉(zhuǎn)換為mp3格式的操作細(xì)節(jié)

    PHP將amr音頻文件轉(zhuǎn)換為mp3格式的操作細(xì)節(jié)

    本文以centos服務(wù)器安裝ffmpeg為例,給大家詳細(xì)介紹PHP將amr音頻文件轉(zhuǎn)換為mp3格式的操作細(xì)節(jié),感興趣的朋友跟隨小編一起看看吧
    2021-07-07
  • Laravel接收前端ajax傳來的數(shù)據(jù)的實例代碼

    Laravel接收前端ajax傳來的數(shù)據(jù)的實例代碼

    本篇文章主要介紹了Laravel接收前端ajax傳來的數(shù)據(jù)的實例代碼,具有一定的參考價值,感興趣的小伙伴們可以參考一下。
    2017-07-07
  • PHP 布爾值的自增與自減的實現(xiàn)方法

    PHP 布爾值的自增與自減的實現(xiàn)方法

    這篇文章主要介紹了PHP 布爾值的自增與自減的實現(xiàn)方法,非常不錯,具有參考借鑒價值,需要的朋友參考下吧
    2018-05-05
  • PHP代碼判斷設(shè)備是手機(jī)還是平板電腦(兩種方法)

    PHP代碼判斷設(shè)備是手機(jī)還是平板電腦(兩種方法)

    隨著互聯(lián)網(wǎng)移動設(shè)備的普及,很多網(wǎng)站都兼容手機(jī)端瀏覽,為了更好的讓網(wǎng)頁在手機(jī)端顯示,我們都選擇了使用CSS媒體查詢制作響應(yīng)式模版。本文給大家介紹PHP代碼判斷設(shè)備是手機(jī)還是平板電腦(兩種方法),感興趣的朋友一起學(xué)習(xí)吧
    2015-10-10
  • 淺談PHP中pack、unpack的詳細(xì)用法

    淺談PHP中pack、unpack的詳細(xì)用法

    這篇文章主要介紹了淺談PHP中pack、unpack的詳細(xì)用法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-03-03

最新評論

政和县| 宁陕县| 竹山县| 琼结县| 青浦区| 筠连县| 海南省| 墨江| 上杭县| 建德市| 屯昌县| 延安市| 南召县| 精河县| 宁德市| 郎溪县| 中超| 东阿县| 社旗县| 盐亭县| 鄂州市| 布拖县| 正宁县| 迁西县| 旬邑县| 昌吉市| 叙永县| 孟村| 房山区| 扬中市| 乌鲁木齐县| 宁陕县| 新干县| 灵璧县| 象州县| 怀仁县| 屯留县| 武汉市| 丰都县| 通州市| 六盘水市|