Reputation:
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:
[Illuminate\Database\QueryException]
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
Upvotes: 1
Views: 21371
Reputation: 1
I encountered the same issue. To resolve it, I deleted my database and recreated it with the same name, which worked perfectly. It's important to note that my database did not contain any sensitive information, so deleting and recreating it was a feasible solution in my case.
Upvotes: 0
Reputation: 35
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
Upvotes: 1
Reputation: 387
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
Upvotes: 5
Reputation: 11
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
Upvotes: 0