0
I just created a new project in Laravel, but when creating a Migration, there is an error in the database.
I have tried to create a new database or use an existing one, but the problem remains.
Follow the mistake I’m having
Illuminate\Database\QueryException : SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations and table_type = 'BASE TABLE')
PDOException::("SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)")
/home/pc-root/Área de Trabalho/laravel/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=homestead", "homestead", "secret", [])
/home/pc-root/Área de Trabalho/laravel/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
I wonder how I can solve this problem.
the file . env is configured with the BD name, user and password?
– Gustavo André Richter
Yes... with the same data presented above.
– aguiarito
The database does not exist yet... should already exist when creating the project?
– aguiarito
Managed to solve your problem?
– Gustavo André Richter
Verify that the user intended to use the bank has the correct access permissions, including depending on the environment it is necessary to establish the access hosts to the bank. Take this example
– Paulo Rodrigo Martins