skip to Main Content

I have problem to my local laravel project and localhost phpmyadmin, this morning my root password of my phpmyadmin is not working and I don’t why it not work because I used this account for along time ago and now it gives an error of this Access denied for user ‘root’@’localhost’ (using password: YES)

So right now I decided to create new account on mysql and I create user as admin and password as admin4321 and well it work.

So right now my .env file look like this.

APP_NAME=Laravel
APP_ENV=production
APP_KEY=base64:ALMV1rEQL49GJWdydqdEiUGmSnrRFXHjFgrNxNX5iWM=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=file_db 
DB_USERNAME=admin
DB_PASSWORD=admin4321

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

REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]   
MAIL_PASSWORD=hiflyer123
MAIL_ENCRYPTION=tls

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}"



NOCAPTCHA_SECRET=6LeSDW8UAAAAAGbsUdQnZnQSc9yIlD-mP-XPGDW0
NOCAPTCHA_SITEKEY=6LeSDW8UAAAAAB5rrfbBsYx7Sa65-6sL9TC_-mMb

So now when I login my auth account in laravel it shows this. and all data from database is not shown in my website.

     Symfony  Component  Debug  Exception  FatalThrowableError (E_ERROR)
Class 'IlluminateDatabaseMySqlConnection' not found

2

Answers


  1. I would suggest using the Illuminate/Database package. You won’t get the DB interface, because that’s a special facade provided by the Laravel Framework, but all the query builder functionality is available through the capsule.

    Install illuminate/database using composer and then follow the included readme notes (included below for completeness).

    Login or Signup to reply.
  2. After you have done any changes in your .env file, you should restart your server using php artisn serve command.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search