1

So basically I changed something in a migration in my laravel project and then tried running migrate:refresh and migrate:reset etc but was getting errors with files not found, so I dropped all of the tables in the phpmyadmin database and attempted to re-migrate.

So initially in the CMD it will say 'migration table created successfully' and then will do nothing else for a couple of minutes, after some time the xampp sql connection will close, giving an error 'Error: MySQL shutdown unexpectedly.'

So I restarted the sql server in xampp and checked the database and some of the migrations have run but not all of them, and the number it runs varies, sometimes it will make 7 of the tables, other times 15 but never does it create all of them successfully before the sql server shuts down.

I am working on a project in a team and this issue seems to be affecting only 2 out of 8 of us, for everyone else the migrations run perfectly after dropping all the tables and they have the exact same copy as me as we are using GIT.

I have tried: Reinstalling xampp & composer, re-making every single migration, and re-cloning my repository from bitbucket.

I've asked around at work and no one seems to have seen this error/issue before so any help at all would be greatly appreciated.

Cheers, Sam.

Sam Fullen
  • 67
  • 7
  • 1
    Have tried [this](http://stackoverflow.com/questions/18022809/xampp-mysql-shutdown-unexpectedly)? (**Warning:** this will remove all InnoDB information, so if you have other databases you need aside from the one you're trying to setup, don't do that). Also try figuring our what's the difference in environment from your colleagues that can run the migration successfully, maybe it will lead to a solution. – Bogdan Dec 11 '15 at 14:12
  • Do any database tables besides the laravel's `migration` table get created? It would be nice to know where the migrations actually stop, and then debug the migration file from there. – Steve Bauman Dec 11 '15 at 15:13
  • Have you tried `composer dump-autoload`? If you modified the migration files (changed their name) composer caches the old names. I would think recloning would fix this but maybe not. – Brynn Bateman Dec 11 '15 at 15:19
  • @bogdan Tried this mate, it didn't seem to work. – Sam Fullen Dec 11 '15 at 15:27
  • @SteveBauman It varies each time I try it, but a few of my own migrations will always run but it always stops on a different one. So sometimes it'll run 8, other times 15 etc. – Sam Fullen Dec 11 '15 at 15:28
  • @BrynnBateman Also tried this, no luck. This is really frustrating. – Sam Fullen Dec 11 '15 at 15:29
  • @SamFullen As a side note, have you considered using [Homestead](http://laravel.com/docs/5.1/homestead)? (it's a much better environment for running Laravel apps than using XAMPP). – Bogdan Dec 11 '15 at 15:33

0 Answers0