第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

我使用 php yii migrate 命令時(shí)出現(xiàn)錯(cuò)誤?

我使用 php yii migrate 命令時(shí)出現(xiàn)錯(cuò)誤?

PHP
千巷貓影 2023-08-19 16:37:50
我正在嘗試在數(shù)據(jù)庫(kù)中創(chuàng)建新的遷移,但是在切換終端中編寫 php yii migrate 后,命令中發(fā)生了此錯(cuò)誤Abdul-fattahs-MacBook-Pro:cust abdul-fattah$ php yii migrateYii Migration Tool (based on Yii v2.0.36)Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away'in /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Connection.php:637Stack trace:#0 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Connection.php(1025): yii\db\Connection->open()#1 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Connection.php(1012): yii\db\Connection->getMasterPdo()#2 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Command.php(255): yii\db\Connection->getSlavePdo()#3 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Command.php(1154): yii\db\Command->prepare(true)#4 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Command.php(401): yii\db\Command->queryInternal('fetchAll', NULL)#5 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/mysql/Schema.php(319): yii\db\Command->queryAll()#6 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/mysql/Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))#7 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Schema.php(757): yii\db\mysql\Schema->loadTableSchema('migration')#8 /Applications/MAMP/htdocs/cust/vendor/yiisoft/yii2/db/Schema.php(193): yii\db\Schema->getTableMetadata('{{%migration}}', 'schema', true)#21 {main}這是我在 config/db.php 中的代碼,我無(wú)法解決我的問(wèn)題.......<?phpreturn [    'class' => 'yii\db\Connection',    'dsn' => 'mysql:host=127.0.0.1;dbname=cust',    'username' => 'root',    'password' => 'root',    'charset' => 'utf8',];
查看完整描述

1 回答

?
繁花不似錦

TA貢獻(xiàn)1851條經(jīng)驗(yàn) 獲得超4個(gè)贊

這解決了我的問(wèn)題我添加了端口:8889


<?php


return [

    'class' => 'yii\db\Connection',

   'dsn' => 'mysql:host=localhost:8889;dbname=cust',

    'username' => 'root',

    'password' => 'root',

    'charset' => 'utf8',

];


查看完整回答
反對(duì) 回復(fù) 2023-08-19
  • 1 回答
  • 0 關(guān)注
  • 158 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)