2017-03-05 77 views
1

我正面臨將我的MySQL數據庫鏈接到Userfrosting的問題。本指南給出了一個向該目錄添加.enr文件的示例,以便Userfrosting可以讀取數據庫憑證,但似乎不起作用。將.env文件添加到UserFrosting

有人可以給我一個深入的教程,如何做到這一點?

在此運行時install.php是錯誤代碼:

Could not connect to the database '@/'. Please check your database 
configuration and/or google the exception shown below: 
    Exception: SQLSTATE[HY000] [2002] No such file or directory 
    Trace: 
    #0 /Applications/XAMPP/xamppfiles/htdocs/myUserFrostingProject/migrations/install.php(63): PDO->__construct('mysql:host=;dbn...', NULL, NULL) 
    #1 {main} 

回答