MySQL的错误:表或视图已经存在
问题描述:
我尝试在MySQL中创建一个表,但我得到以下错误:MySQL的错误:表或视图已经存在
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)
我该如何解决这个问题?
答
试试这个
php artisan migrate:refresh
可我希望这项工作。
如果MySQL说已经有一个表,那么你是运行'php artisan migrate'还是'php artisan migrate:install'? – nogad
? – lagbox
php artisan migrate – Hashan