我是 laravel 的新手,我想先遷移表我更改了 .env 信息(數(shù)據(jù)庫(kù)名稱、密碼、用戶名),然后創(chuàng)建了模型并編寫(xiě)了屬性,但是當(dāng)我編寫(xiě)命令 php artisan migrate 時(shí),表沒(méi)有出現(xiàn)在我的 phpmyadmin 數(shù)據(jù)庫(kù)中,出現(xiàn)以下錯(cuò)誤:SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' (SQL: select * from information_schema.tables where table_schema = forge and table_name = migrations and table_type = 'BASE TABLE') catch (Exception $e) { > 664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } ...
為什么遷移數(shù)據(jù)庫(kù)在 Laravel 中不起作用?
慕尼黑8549860
2021-10-08 14:40:01