I don't understand how to fix this problem. what should i do witthon connection.php and connector.php file
In Connection.php line 664:
SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost'
(using password: YES ) (SQL: select * from information_schema.tables
where table_schema = STDHUB and table _name = migrations)
In Connector.php line 67:
SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost'
(using password: YES )
It indicates that you're using wrong credentials to connect to MySQL.
Check your MySQL credentials, for example:
username: root
password: secret
Then you should change the value in your .env in your Laravel project folder. If .env does not exist, copy a new one from your .env.example.
DB_USERNAME=root
DB_PASSWORD=secret
Please check DB_User , DB_PWD in your .env file
Related
I have setup an existing laravel github project with docker, everything is working fine.
I am getting a connection refused error when trying to login to my backend.
Th exact error is:
Illuminate\ Database\ QueryException
SQLSTATE[HY000] [2002] Connection refused
SELECT * FROM users WHERE email = xxxx limit 1
My .env is:
APP_NAME=Laravel
APP_ENV=local
APP_DEBUG=true
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE="xxxxx"
DB_USERNAME="xxxxx"
DB_PASSWORD="xxxxx"
MySQL said:
1045 - Access denied for user 'root'#'localhost' (using password: YES)
mysqli_real_connect(): (28000/1045): Access denied for user 'root'#'localhost' (using password: YES)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL
This question already has answers here:
lavaral 5 ERROR{ (SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost' (using password: YES)}
(2 answers)
Closed 4 years ago.
I am unable to register a user account in a Laravel project.
Error
SQLSTATE[HY000] [1045] Access denied for user 'root'#'localhost' (using password: YES) (SQL: select count(*) as aggregate from `users` where `email` = xxx#xx.com)
Is there a solution?
Make sure that you update the below values in your .env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=root
DB_PASSWORD=
Once updated .env file, stop the server of your project and serve the project again using the php artisan serve command.
You have to make changes in the .env file for the following fields:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE= your database name
DB_USERNAME= your user name
DB_PASSWORD= your password
I am having problem in laravel project connection with database on the live server all credentials are correct in .env and database.php files.
DB_CONNECTION=mysql
DB_HOST=mysql.hostinger.in
DB_PORT=3306
DB_DATABASE=u497405800_new
DB_USERNAME=u497405800_biosp
DB_PASSWORD=bn2OC9IzSop7
ERROR SHOWING:
PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access
denied for user 'u497405800_biosp'#'127.0.0.1' (using password: NO)
i do not know why lately when I try to make a regitro in the database (using laravel), I get this error:
'PDOException' with message 'SQLSTATE [HY000] [1045] Access denied for user' homestead '#' localhost '( using password: YES) '.
.env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pruebas
DB_USERNAME=root
DB_PASSWORD=
in .env file is properly configured. What more could be ??
thanks.
the solution for this error, if everything is properly configured, is to restart the local server, in my case xampp