久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Laravel 5 數(shù)據(jù)庫問題

Laravel 5 database issue(Laravel 5 數(shù)據(jù)庫問題)
本文介紹了Laravel 5 數(shù)據(jù)庫問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我已經(jīng)使用這個命令成功安裝了 laravel 5:

I've installed laravel 5 successfully by using this command:

composer create-project laravel/laravel test-laravel-5-project dev-develop --prefer-dist

我什至使用 php artisan -V 命令驗證了安裝的 laravel 的版本.輸出是

I even verified the version of installed laravel by using php artisan -V command. The output was

Laravel Framework version 5.0-dev

然后我去app/config/database.php,給dafault db作為mysql,給配置作為

Then I went to app/config/database.php, gave dafault db as mysql and gave configurations as

'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'Logintestfive'), 'username'=> env('DB_USERNAME', 'root'), 'password'=> env('DB_PASSWORD', 'manasa'), 'charset'=> 'utf-8', 'collation'=> 'utf-8_unicode_ci', prefix=> '', 'strict'=> false, ]

然后我去localhost:8000/auth/register填寫表格并提交數(shù)據(jù),這是我得到的錯誤:

Then I went to localhost:8000/auth/register and filled up the form and submitted the data and this is the error which I got:

PDOException in Connector.php line 47: SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

但是我既沒有使用 laravel homestead 在我的系統(tǒng)中安裝 Laravel 5,也沒有使用 vagrant 來設置 laravel homestead.它告訴我是這樣的:

But I've neither used laravel homestead for installng laravel 5 in my system nor used vagrant to set up laravel homestead. And it tells me like this:

in Connector.php line 47
at PDO->__construct('mysql:host=localhost;dbname=homestead', 'homestead', 'secret', array('0', '2', '0', false, '0')) in Connector.php line 47
at Connector->createConnection('mysql:host=localhost;dbname=homestead', array('driver' => 'mysql', 'host' => 'localhost', 'database' => 'homestead', 'username' => 'homestead', 'password' => 'secret', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'name' => 'mysql'), array('0', '2', '0', false, '0')) in MySqlConnector.php line 20
at MySqlConnector->connect(array('driver' => 'mysql', 'host' => 'localhost', 'database' => 'homestead', 'username' => 'homestead', 'password' => 'secret', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'name' => 'mysql')) in compiled.php line 10545
at ConnectionFactory->createSingleConnection(array('driver' => 'mysql', 'host' => 'localhost', 'database' => 'homestead', 'username' => 'homestead', 'password' => 'secret', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'name' => 'mysql')) in compiled.php line 10541
at ConnectionFactory->make(array('driver' => 'mysql', 'host' => 'localhost', 'database' => 'homestead', 'username' => 'homestead', 'password' => 'secret', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false), 'mysql') in compiled.php line 10459

我該如何解決這些問題?

How can I fix those issues?

推薦答案

我遇到了類似的問題.我使用 php artisan serve 命令啟動了我的服務器,并編輯了 .env 文件并刷新了沒有反映任何更改的網(wǎng)頁!

I got a similar problem. I started my server using php artisan serve command, and edited the .env file and refreshed the web-page which did not reflect any changes!

我通過停止網(wǎng)絡服務器、編輯 .env.php 文件并重新啟動網(wǎng)絡服務器來修復它!

I fixed it by stopping the webserver, editing the .env.php file and restarting the webserver!

所以我猜這是 .env.php 文件的緩存問題.

So I guess it's a caching-issue of the .env.php file.

這篇關于Laravel 5 數(shù)據(jù)庫問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Magento products by categories(按類別劃分的 Magento 產(chǎn)品)
Resource interpreted as image but transferred with MIME type text/html - Magento(資源被解釋為圖像但使用 MIME 類型 text/html 傳輸 - Magento)
Is there an event for customer account registration in Magento?(Magento 中是否有客戶帳戶注冊事件?)
Magento addFieldToFilter: Two fields, match as OR, not AND(Magento addFieldToFilter:兩個字段,匹配為 OR,而不是 AND)
quot;Error 404 Not Foundquot; in Magento Admin Login Page(“未找到錯誤 404在 Magento 管理員登錄頁面)
Get Order Increment Id in Magento(在 Magento 中獲取訂單增量 ID)
主站蜘蛛池模板: 最新免费av网站 | 毛片毛片毛片毛片 | 日韩免费三级 | 久久综合久 | 精品福利视频一区二区三区 | av在线二区 | 精品美女视频在免费观看 | 99精品国自产在线 | 97超碰免费 | 韩国久久 | 懂色中文一区二区三区在线视频 | 日韩高清中文字幕 | 久久久久国产一区二区三区四区 | 成人高清视频在线观看 | 成人啊啊啊 | 精品无码久久久久久国产 | 99热这里都是精品 | 97色在线视频| 精品一区二区三区在线观看 | 综合色在线 | 精品少妇v888av | 色综合久久久久 | xnxx 日本免费| 亚洲精品乱码久久久久久蜜桃91 | av免费在线观看网站 | ww亚洲ww亚在线观看 | 91久久国产综合久久91精品网站 | 国产欧美在线 | 欧美一区二区三区在线观看 | 亚洲狠狠 | 久草在线在线精品观看 | 婷婷一级片 | 久久综合久久久 | 久久精品国产亚洲 | 在线亚洲人成电影网站色www | 中文字幕亚洲视频 | 精品久久国产老人久久综合 | 国产91亚洲精品 | 不卡视频一区二区三区 | 999久久久久久久久6666 | 国产精品视频在线播放 |