my code run fine in localhost but when i uploaded it on the serve following error show
Illuminate \ Database \ QueryException (1045)
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from rooms
order by order_by
asc)
Previous exceptions
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (1045)
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:tT9jGFWVeBX5uLy/CVZbs8k+RNGBpMyJ526xfRv3DKQ=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=janatapa_shre
DB_USERNAME=janatapa_shre
DB_PASSWORD=Shre@123
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
though i have changed the database name , user and password in .env file it still says "Access denied for user 'root'@'localhost' (using password: NO)" which was my localhost password and user name''
I couldnt even clear my cache
while i was try to use following code on server
php artisan cache:clear
php artisan config:clear
php artisan config:cache
php artisan view:clear
the following error was shown on the terminal
[In Connection.php line 664:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas
sword: NO) (SQL: select * from rooms
order by order_by
asc)
In Connector.php line 70:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas
sword: NO) ]1