数据迁移之后点击注册报错42S02
在一番折腾之后终于把数据迁移搞完 然后点击注册之后报错
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel-shop.users' doesn't exist (SQL: select count(*) as aggregate from `users` where `email` = loki@gmail.com)
数据迁移成功的提示
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.11 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.1 seconds)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated: 2019_08_19_000000_create_failed_jobs_table (0.06 seconds)
Migrating: 2020_09_25_070516_create_people_table
Migrated: 2020_09_25_070516_create_people_table (0.04 seconds)
然后不管我咋修改就是一直注册不了,用navicat看了下数据库里有4张表
failed_jobs
laravel-shop
migrations
password_resets
不知道问题出在哪里,报错信息应该是没有 laravel-shop.users 这个表 但是我直接在navicat里创建也没有用..
环境是win10 homestead
.env文件的配置是
APP_NAME= "laravel Shop"
DB_CONNECTION=mysql
DB_HOST=192.168.10.10
DB_PORT=3306
DB_DATABASE=laravel-shop
DB_USERNAME=homestead
DB_PASSWORD=secret
推荐文章: