php-login-script icon indicating copy to clipboard operation
php-login-script copied to clipboard

Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

Open ashikv-dev opened this issue 6 years ago • 6 comments

please help me resolve this problem when I open the index,php

ashikv-dev avatar Mar 03 '20 11:03 ashikv-dev

there are might b issue with mysql connection, try to migrate if it is not try below the commands: php artisan cache:clear php artisan config:clear php artisan route:clear

check your .env file properly. there is may be your phpmyadmin username or password wrong or database name which created not correct, Please let me know it will not help

sammirzaev avatar Mar 09 '20 05:03 sammirzaev

Try to login to mysql in your terminal / command prompt first. If you succeeded, apply the same credentials to database.php file. If you somehow already change the credentials, then you have to adjust database.php file accordingly.

i01107 avatar Mar 24 '20 03:03 i01107

pls povide me with codes and errors

sammirzaev avatar Mar 24 '20 13:03 sammirzaev

your .env inside

sammirzaev avatar Mar 24 '20 13:03 sammirzaev

well if your local host tool weren't set any password like mine (default), then go to database.php and remove the password i mean (root), $password = 'root';

harrazmasri avatar May 17 '20 00:05 harrazmasri

please help me resolve this problem when I open the index,php

well its simple just set password from 'root' to empty ellipsis= define('DB_PASSWORD', '');

deepu0111 avatar Jan 07 '21 16:01 deepu0111