when typing the command php artisan migrate, it is giving me an error:
IlluminateDatabaseQueryException : SQLSTATE[HY000] [1049] Unknown
database 'proj' (SQL: select * from information_schema.tables where
table_schema = proj and table_name = migrations and table_type = 'BASE
TABLE')
Although, i edited the .env
file and i had created the database proj
and restart the cmd and also i tried
php artisan config:cache
and similar commands but still not working
2
Answers
This means that you don’t have this database created. First create the database and after run:
php artisan migrate:fresh
to create the tables.By the screenshots you have uploaded, you have many servers. Check the port of the server
mysql
and change the port on the .env file. This will work.Open the .env file and edit:
Run below commands:
I hope this will help you