[3.x]: INSERT INTO `resourcepaths` ... ON DUPLICATE KEY UPDATE error
What happened?
Description
I have a CraftCMS 3.7.44 staging site on a Fortrabbit 8.1 instance, where I have exported the database. I am now setting up a new local Nitro instance with the same repo.
When I run ./craft install everything works perfectly and I can access the CMS. But when I import my production database, I can't log into the CMS (spinner gif just spins for eternity) and I'm getting the following in my web.log: web.log
Steps to reproduce
- Set up new nitro local project
- Export the production DB
- Import the production DB into the nitro project
Expected behavior
The local version should be a working copy of the production DB site.
Actual behavior
Can't log into the CMS.
Craft CMS version
3.7.44
PHP version
8.0
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
I’m seeing lots of DB-related issues in the logs. Most recent is:
Base table or view not found: 1146 Table 'arksen-multi-sites.categorygroups' doesn't exist
So it sounds like the DB restore didn’t work properly, or your connection settings in config/db.php or .env are incorrect.