download1002 2017-07-14 23:24
浏览 38
已采纳

我无法创建迁移Laravel5 Access拒绝用户'homestead'@'localhost'(使用密码:YES)

Terminal show me this message:

enter image description here

my env:

enter image description here

my database.php:

'default' => env('DB_CONNECTION', 'mysql'),
'mysql' => [
  'driver' => 'mysql',
  'host' => env('DB_HOST', '127.0.0.1'),
  'port' => env('DB_PORT', '3306'),
  'database' => env('DB_DATABASE', 'laravelup'),
  'username' => env('DB_USERNAME', 'root'),            
  'password' => env('DB_PASSWORD', '1'),
  'unix_socket' => env('DB_SOCKET', ''),   
  'charset' => 'utf8mb4',    
  'collation' => 'utf8mb4_unicode_ci',    
  'prefix' => '',  
  'strict' => true,
  'engine' => null,        
],

How can I solve this issue ?

  • 写回答

1条回答 默认 最新

  • douju6651 2017-07-14 23:26
    关注

    Just change your .env file like this

    DB_DATABASE=laravelup
    DB_USERNAME=root
    DB_PASSWORD=                  //blank here
    

    And it will be working.

    I maybe laravel configration cache problem.

    If you type this command "php artisan config:clear" and try again, then it will be working.
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 宇视监控服务器无法登录
  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据