问题描述
当我运行“ PHP artisan migration”时,出现以下错误
Access denied for user 'dbuser'@'localhost' (using password: YES) (sql: select * from @R_320_4045@ion_schema.tables where table_schema = dbname_main and table_name = migrations and table_type = 'BASE TABLE')
我尝试删除供应商并重新安装,但没有成功。我正在使用PHP7.4
laravel 7.x所需的所有PHP扩展是否都适用于PHP7.4?
解决方法
通常,使用无效的数据库凭据会收到此错误。 尝试使用正确的。
,请仔细检查您在 .env 文件中为数据库变量(带DB_前缀的变量)设置的值
,如果您确定数据库凭据正确,请尝试:
php artisan config:clear
php artisan config:cache
php artisan cache:clear