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

laravel執(zhí)行php artisan migrate報(bào)錯(cuò)的解決方法

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

報(bào)錯(cuò)一

$ 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"沒開啟

報(bào)錯(cuò)二

$ 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

報(bào)錯(cuò)三

$ 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報(bào)錯(cuò)的解決方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

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

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

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

    ThinkPHP之用戶注冊(cè)登錄留言完整實(shí)例

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

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

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

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

    在PHP網(wǎng)站開發(fā)中為了網(wǎng)站推廣和SEO等需要,需要對(duì)網(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è)置為中文的例子(驗(yàn)證提示為中文)

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

    今天小編就為大家分享一篇laravel validate 設(shè)置為中文的例子(驗(yàn)證提示為中文),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    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ù)的實(shí)例代碼

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

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

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

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

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

    隨著互聯(lián)網(wǎng)移動(dò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ì)用法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2018-03-03

最新評(píng)論

安多县| 胶南市| 隆子县| 股票| 广西| 临湘市| 抚远县| 陕西省| 崇左市| 晋州市| 榕江县| 六安市| 营山县| 健康| 双柏县| 连城县| 南丰县| 宜良县| 响水县| 彩票| 马边| 镇康县| 司法| 裕民县| 宜宾市| 恩平市| 湖口县| 枣强县| 汉源县| 苍南县| 沁源县| 营山县| 历史| 璧山县| 云霄县| 元氏县| 达州市| 乐平市| 天水市| 罗平县| 乌拉特前旗|