1
I’m making the connection to the database mysql
with laravel
using the following code in the archive database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'estoque_laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', '123456'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
Filing cabinet .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=estoque_laravel
DB_USERNAME=root
DB_PASSWORD=123456
But when I go to make a select in the bank, I have the following mistake
PDOException in Connector.php line 47:
SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
I made this change, but the error persists :/
– RickPariz
Is the error exactly the same? With the same information:
Access denied for user 'homestead'@'localhost'
. Was set the userroot
– DNick
yes, exactly the same
– RickPariz
I updated the answer. Check the end of it and do some tests in the access configuration in your bank if it is configured according to the Standard
– DNick
Those settings are from Laravel 5.0 ? because I’m using 5.0
– RickPariz
Yes. This setting is compatible with the 5.0 Standard
– DNick
So, the settings were being cached by the server, I cleared the cache and everything worked normally
– RickPariz