Laravel PDOException SQLSTATE[HY000] [1049] Unknown database 'forge'

后端 未结 23 2455
醉酒成梦
醉酒成梦 2020-12-25 11:51

I am using Laravel to connect to MySQL database.

I got this exception:

PDOException
SQLSTATE[HY000] [1049] Unknown database \'forge\'
23条回答
  •  臣服心动
    2020-12-25 12:38

    My APP_NAME variables in .env.example and .env and app.php were with space e.g. The App . Surounding that by ' and php artisan cache:clear and setting new generated app key to APP_KEY variable through env files and relaunching the server by php artisan serve solved this issue

提交回复
热议问题