Laravel Tablespace for table xxx exists

Question

Hi,

I’m getting this error on localhost. Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT

Answer ( 1 )

    0
    2023-01-25T13:35:01+00:00

    I ran into this error when i tried to migrate with Laravel 7 on localhost. Many things can cause this problem. For me the cause was that in ‘xampp/mysql/data/app_name’ where “app_name” is the name of your app contained orphan .idb files. I removed all of them, and then the migration and seeding ran successfully.

    If you try this solution, don’t forget to backup you files.

Leave an answer