artisan migrate error
Closed this issue · 13 comments
I'm getting this error when executing this command:
php artisan migrate
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:742
738▕ // If an exception occurs when attempting to run a query, we'll format the error
739▕ // message to include the bindings with SQL, which will make this exception a
740▕ // lot more helpful to the developer instead of just the database's errors.
741▕ catch (Exception $e) {
➜ 742▕ throw new QueryException(
743▕ $query, $this->prepareBindings($bindings), $e
744▕ );
745▕ }
746▕ }
+36 vendor frames
37 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Hello there @shadyslim2018 do make sure that you used the right credentials in the .env file to connect yo a database
https://laravel.com/docs/9.x/configuration this is a related document to help you
If you still encounter any issues do tell
Thank, I got all that working. Now it goes to 127.0.0.1/dashboard then it says
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
I'm not too sure if it's a php config error. The default index.php does load.
Are you using xampp or the built in laravel Web server
laravel web server, i don't think the web server is working correctly.
Can I see your .env file
This is weird in laravel
You are sure that you are using php artisan serve?
Hmm your issue is mostly found in xampp
If you installed it in the htdocs folder, instead of localhost/dashboard
Go to localhost/{foldername}/dashboard
Absolutely wonderful
Would work on proper documentation soon
Although got rid of the route that page
Still wondering how you got there?
I had to run
sudo php artisan serve --host=127.0.0.1 --port=91
BTW it looks fantastic, I've sent a few screenshots to one of the school.
Thanks a bunch, would love to give my best in taking schools online
I consider this a closed issue