【问题标题】:Access denied for user ‘dbuser’ [duplicate]用户“dbuser”的访问被拒绝[重复]
【发布时间】:2018-07-03 01:27:45
【问题描述】:

为了创建数据库,我在终端运行命令: php工匠迁移

我明白了:

SQLSTATE [HY00] [1045] Access denied for user ‘dbuser’@‘localhost’ (using password: YES) (SQL: select * from information_schema.table where table_schema = blog and table_name = migrations) 

我已经运行命令php artisan config:cache 并且它成功但我似乎仍然无法配置phpMyAdmin 以连接到数据库?我该如何解决这个错误?

【问题讨论】:

  • 显示您的配置代码
  • 你有这样的用户和他的密码
  • 我只是看了一下链接。问题:“laravelu”?我将我的项目命名为博客,所以我应该输入 laravel-blog 吗?或 laravelblog

标签: php laravel


【解决方案1】:

.envconfig 目录中的文件进行任何与配置相关的更改后,

你需要运行:

$ php artisan config:clear

【讨论】:

  • 我运行了命令,当我运行 php artisan migrate 时,我仍然得到同样的错误
  • @pinealda 检查您的凭据是否正确
  • 我该检查哪个文件?
  • .env file @pinealda 中的数据库凭据、主机名用户名和密码
  • 我有 laravel-woke 作为数据库,我有 'dbuser' 和 '123' 那么它应该在哪里匹配呢?好像phpMyAdmin没有连接..我在里面找不到数据库
猜你喜欢
  • 2011-08-18
  • 2016-03-09
  • 2021-10-27
  • 1970-01-01
  • 2017-10-30
  • 1970-01-01
  • 2019-12-15
  • 1970-01-01
  • 2013-11-02
相关资源
最近更新 更多