Error PHP Artisan Migrate

0

I'm having the following error when executing the command.

  

In Connection.php line 647:

     

SQLSTATE [HY000] [1049] Unknown database 'localhost' (SQL: select *   from information_schema.tables where table_schem a = localhost and   table_name = migrations)

     

In Connector.php line 68:

     

SQLSTATE [HY000] [1049] Unknown database 'localhost'

    
asked by anonymous 15.03.2018 / 11:51

1 answer

0

Your configuration file .env is configured incorrectly, in the parameter where your database name should be, it is set to localhost your file in the configuration part of the database parameters should look like this :

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE= nome_base*
DB_USERNAME= root(ou seu user local)*
DB_PASSWORD= senha*
    
16.03.2018 / 21:21