I'm using laravel socialite to make facebook login, following this website: Social Logins with Socialite
as soon as I type a command in the terminal:
php artisan migrate
This shows the error:
Illuminate\Database\QueryException : SQLSTATE[HY000] [1049] Unknown database 'laravel' (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
Open the .env
file and edit it. Just set up correct DB credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE= // Your Database Name
DB_USERNAME= // Your Database Username
DB_PASSWORD= // Your Database Password
The DB_USERNAME
should be set to root if you do not have a default username
If no password is set on the database, clear it DB_PASSWORD
After completion of .env edit must be clear cache: php artisan config:cache
After Run the migrate Artisan command: php artisan migrate
The database called laravel
cannot be found in PhpMyAdmin
Please follow these steps to solve this problem :
Go to phpmyadmin
in your localhost dashboard
Create a database and name it laravel
run the php artisan migrate
CMD or Terminal of your editor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With