简体   繁体   中英

pdoexception sqlstate hy000 1044 access denied for user ''@'localhost' to database 'laravel'

  • code app/config/database.php. i set database name as laravel.
'mysql' => array(
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'laravel',
        'username'  => 'forge',
        'password'  => '',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ),

来自cmd的图像

Edit your config file in app/config/local/database.php instead. Or in the config file you have specified the database laravel_crud . Do a search for it if you can't find it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM