Laravel 5 error SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

前端 未结 24 1947
Happy的楠姐
Happy的楠姐 2021-02-03 19:23

I have installed Laravel 5 successfully and changed MySQL credentials in database.php file in config directory to \'

mysql\' => [
            \'driver\'           


        
24条回答
  •  自闭症患者
    2021-02-03 19:49

    I came up with this too... then I solve it by putting the database information directly in " database.php " In your case, I would change the information like this

    mysql' => [
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'wdcollect',
            'username'  => 'root',
            'password'  => '',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ],
    

    and don't forget to change your setting in XAMPP's config.inc

    ['auth_type'] = 'config';
    ['Servers'][$i]['user'] = 'root';
    ['Servers'][$i]['password'] = '';
    ['AllowNoPassword'] = true;
    

提交回复
热议问题