php artisan migrate:install
{"error":{"type":"ErrorException","message":"PDO::__construct(): [2002] Connection refused (trying to connect via tcp:\/\/127.0.0.1:3306)","file":"\/Applications\/MAMP\/htdocs\/DRCSports\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/Connector.php","line":47}}
在我database.php中我已經更新了信息到mysqlLaravel 4遷移:安裝ErrorException
'mysql' => array(
'driver' => 'mysql',
'host' => '127.0.0.1',
'database' => 'Laravel_DRCSports',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
我不知道如果我理解正確的錯誤,但對我來說,它看起來像我laravel沒有連接到mysql的權利。如果是這種情況,我不知道如何解決它。
看起來像PDO無法打開該主機的連接:ip。 你確定在127.0.0.1上有3306端口的mysql服務器嗎?你有沒有試圖telnet 這個主機,看看你是否能夠連接? –
該端口不是3306,它是8888.我看到它將要連接到3306端口,我只是不確定在哪裏將其更改爲8888。 telnet 127.0.0.1 8888 嘗試127.0.0.1 ... 連接到本地主機。 轉義字符是'^]'。 H 5.5.9g; 0 | Br8?Sd〜m'xH @ G#tFmysql_native_password – Rachael
只需添加到數組中:'port'=> 8888 –