【发布时间】:2019-11-23 08:02:16
【问题描述】:
我是 laravel 的新手,我想先迁移表我更改了 .env 信息(数据库名称、密码、用户名)并制作了模型并编写了属性,但是当我编写命令 php artisan 迁移表时没有出现在我的 phpmyadmin 数据库中并出现以下错误:
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| } ...
【问题讨论】:
-
什么是错误并添加更多详细信息
-
请发布错误,以便人们可以帮助您并确保您已连接到您的数据库
-
这是出现的错误 Illuminate\Database\QueryException : SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' (SQL: select * from information_schema.tables其中 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| }