skip to Main Content

I had issues with my xampp phpmyadmin, I had to uninstall and reinstall it, after that , I tried copying my files back and running my application but it’s not working.

Its giving me

SQLSTATE[42S02]: Base table or view not found: 1932 Table 'blog.categories' doesn't exist in engine (SQL: select * from `categories`)

I have tried migration of my files to the database but it’s also not working

Here’s what it says:

  [IlluminateDatabaseQueryException]
  SQLSTATE[42S02]: Base table or view not found: 1932 Table 'blog.migrations' doesn't exist in engine (SQL: select `m
  igration` from `migrations` order by `batch` asc, `migration` asc)



  [PDOException]
  SQLSTATE[42S02]: Base table or view not found: 1932 Table 'blog.migrations' doesn't exist in engine

3

Answers


  1. That means that the DB lost or the base of that database doesn’t exist. you must have a backup where you will have to drop and import that same db back then restart to what you wanted to do

    or

    drop the Database, create the same name and use command:

    php artisan migrate

    to return it but all previous data will have been lost and you have to add it manually or via the application again

    Login or Signup to reply.
  2. Disconnect all server connections.
    Including commands:

    php artisan serve
    

    And stop the Apache server and MySQL database and start again. then run:

    php artisan migrate
    
    Login or Signup to reply.
  3. If you try running this before

    php artisan schema:dump
    

    which may conflicted with database migration because it squashing migrations to be executed as sql before any migrations in database/migration, try deleting any file in database/schema then try run

    php artisan migrate
    

    if the migrate command didn’t simply work, try the Negar answer to help the migration

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search