# Command: `affiliate:sync-all`

**Description**: Sync websites from domains to mysql and create/update affiliate links with correct website associations
**Status**: completed
**Started**: 2026-06-30 12:55:45 | **Ended**: 2026-06-30 12:55:46 | **Duration**: 1s
**Jobs**: 0 dispatched / 0 completed / 0 failed

---

## Command Output

12:55:45 [INFO] Lock acquired for command: affiliate:sync-all

12:55:45 [INFO] Starting complete affiliate system synchronization...

12:55:45 [INFO] Step 1: Syncing websites from domains to mysql...

12:55:45 [ERROR] Error syncing websites: SQLSTATE\[HY000\] \[1044\] Access denied for user 'kokos'@'%' to database 'domains' (Connection: domains, Host: 127.0.0.1, Port: 3306, Database: domains, SQL: select count(\*) as aggregate from 'websites')

12:55:45 [INFO] Step 2: Cleaning up orphan affiliate links...

12:55:45 [INFO] Found 468 affiliate links in mysql database

12:55:45 [INFO] Loading domains affiliate links data...

12:55:45 [ERROR] Error cleaning up orphan links: SQLSTATE\[HY000\] \[1044\] Access denied for user 'kokos'@'%' to database 'domains' (Connection: domains, Host: 127.0.0.1, Port: 3306, Database: domains, SQL: select 'al'.'id', 'al'.'website\_id', 'w'.'hostname' as 'correct\_hostname' from 'affiliate\_links' as 'al' left join 'websites' as 'w' on 'al'.'website\_id' = 'w'.'id')

12:55:45 [INFO] Step 3: Syncing affiliate links with correct website associations...

12:55:45 [ERROR] Error syncing affiliate links: SQLSTATE\[HY000\] \[1044\] Access denied for user 'kokos'@'%' to database 'domains' (Connection: domains, Host: 127.0.0.1, Port: 3306, Database: domains, SQL: select 'id' from 'affiliate\_links')

12:55:45 [SUCCESS] Complete synchronization finished!

12:55:45 [INFO] Complete synchronization finished!

12:55:45 [INFO] Lock released for affiliate:sync-all

---

## Jobs (0)

*No jobs dispatched*

*Exported at 2026-08-28T15:14:04+00:00*
