Shawdow's avatar

In Connection.php line 664:SQLSTATE[HY000] [1045] Access denied for user 'phpmyadmin'@'localhost' (using password: YES)

when i try to connect the laravel Project with database shows me error

SQLSTATE[HY000] [1045] Access denied for user 'phpmyadmin'@'localhost' (usi ng password: YES) (SQL: select * from information_schema.tables where table _schema = shop and table_name = migrations)

In PDOConnection.php line 40:

SQLSTATE[HY000] [1045] Access denied for user 'phpmyadmin'@'localhost' (usi ng password: YES)

below .env file

APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=shop
DB_USERNAME=**** //username
DB_PASSWORD=*****//password


BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

0 likes
4 replies
yurichandra's avatar

I guess you put wrong password in .env file. Make sure you do double check before try to connect your Database

Shawdow's avatar

@yurichandra my password and username is correct i am able to login for both mysql and phpmyadmin manually

Funfare's avatar

try localhost instead of 127.0.0.1

and check what hosts are allowed to connect with user phpmyadmin, maybe the user ist created with phpmyadmin@localhost so 127.0.0.1 will fail

Please or to participate in this conversation.