php artisan migrate 报错

C:\Study\php\newblog>php artisan migrate
Migrating: 2019_12_14_000001_create_personal_access_tokens_table

Illuminate\Database\QueryException

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘personal_access_tokens’ already exists (SQL: create table personal_access_tokens (id bigint unsigned not null auto_increment primary key, tokenable_type varchar(191) not null, tokenable_id bigint unsigned not null, name varchar(191) not null, token varchar(64) not null, abilities text null, last_used_at timestamp null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’)

at C:\Study\php\newblog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we’ll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database’s errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }

1 C:\Study\php\newblog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:501
PDOException::(“SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘personal_access_tokens’ already exists”)

2 C:\Study\php\newblog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:501
PDOStatement::execute()

 求解!!
本作品采用《CC 协议》,转载必须注明作者和本文链接
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 8

laravel8 环境

3年前 评论

已解决,就是把显示已存在的表删除

3年前 评论
预颜 (作者) (楼主) 3年前

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘personal_access_tokens’ already exists (SQL: create table personal_access_tokens (id bigint unsigned not null auto_increment primary key, tokenable_type varchar(191) not null, tokenable_id bigint unsigned not null, name varchar(191) not null, token varchar(64) not null, abilities text null, last_used_at timestamp null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate ‘utf8mb4_unicode_ci’) file 看清楚好吗 显示错误提示是已存在,这只是报了其中一种出 你报的是其他的错误可以去百度找找的呢

3年前 评论
chowjiawei

错误不是你这样子看的。。。。

Base table or view already exists: 1050 Table ‘personal_access_tokens’ already exists

错误很明显就告诉你,只不过是英文的

3年前 评论
预颜 (楼主) 3年前
预颜 (楼主) 3年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!