PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, January 26, 2022

[FIXED] Laravel - SQLSTATE[42S02]: Base table or view not found: 1146 Table

 January 26, 2022     laravel, laravel-5.5, php, voyager     No comments   

Issue

I'm setup homestead in my pc then i'm try to access my files via local domain. But when i'm trying to connect with DB then showing me this error. I can't access my others projects too. I setup everything very well. But i don't know why showing me this error.

Note: I'm using windows 8.1

Here is my setup code:

  1. Homestead.yaml

ip: "192.168.10.10"

memory: 2048

cpus: 1

provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:

- ~/.ssh/id_rsa

folders:

- map: F:/xampp/htdocs/Projects
  to: /home/vagrant/Projects

sites:

- map: govt-university.dev
  to: /home/vagrant/Projects/govt-university/public

- map: voyager.dev
  to: /home/vagrant/Projects/voyager/public

- map: evaluationplus.dev
  to: /home/vagrant/Projects/laravel-evaluationplus/public

- map: laravel-university.dev
  to: /home/vagrant/Projects/laravel-evaluationplus/public

databases: - homestead


  1. Host file

    192.168.10.10 govt-university.dev
    
    192.168.10.10 voyager.dev
    
    192.168.10.10 evaluationplus.dev
    
    192.168.10.10 laravel-university.dev
    

  1. ENV file

    APP_NAME= Laravel

    APP_ENV=local

    APP_KEY=base64:nmcR0V2cbq+26H3EBdLmYRQN5bkiOryROTxHpvUzuvA=

    APP_DEBUG=true

    APP_LOG_LEVEL=debug

    APP_URL=http://voyager.dev

    DB_CONNECTION=mysql

    DB_HOST=127.0.0.1

    DB_PORT=3306

    DB_DATABASE=voyager

    DB_USERNAME=homestead

    DB_PASSWORD=secret


Error Image: enter image description here

Please help me to solve this problem. Thanks


Solution

You need to ssh into Vagrant and then run artisan command to migrate database. Once you do this will be fixed.



Answered By - Manzurul
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing