1
votes

I try to create a table in MySQL but I get the following error:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'migrations' already exists (SQL: create table migrations (id int unsigned not null auto_increment primary key, migration varchar(255) not null, batch int not null) default character set utf8 collate utf8_unicode_ci)

How can I fix this?

2
if MySQL says there is already a table, there isuser6763587
are you running php artisan migrate or php artisan migrate:install ?lagbox
php artisan migrateHashan

2 Answers

1
votes

Try

php artisan migrate:fresh 

Or

Manually empty the database and including the migrations table and then try migrating again.

0
votes

Try this

php artisan migrate:refresh

may i hope this work.