Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artisan migrate error #82

Closed
shadyslim2018 opened this issue Jul 11, 2022 · 13 comments
Closed

artisan migrate error #82

shadyslim2018 opened this issue Jul 11, 2022 · 13 comments

Comments

@shadyslim2018
Copy link

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()

@yungifez
Copy link
Owner

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

@shadyslim2018
Copy link
Author

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.

@yungifez
Copy link
Owner

Are you using xampp or the built in laravel Web server

@shadyslim2018
Copy link
Author

laravel web server, i don't think the web server is working correctly.

@yungifez
Copy link
Owner

Can I see your .env file

@yungifez
Copy link
Owner

This is weird in laravel

You are sure that you are using php artisan serve?

@yungifez
Copy link
Owner

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

@shadyslim2018
Copy link
Author

I finally got Laravel working, now to try skuul
Screenshot from 2022-07-11 13-57-16
l

@yungifez
Copy link
Owner

Absolutely wonderful

Would work on proper documentation soon

@yungifez
Copy link
Owner

Although got rid of the route that page

Still wondering how you got there?

@shadyslim2018
Copy link
Author

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.

@yungifez
Copy link
Owner

Thanks a bunch, would love to give my best in taking schools online

@yungifez
Copy link
Owner

I consider this a closed issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants