# Update schlägt Fehl - SQL Fehler

**URL:** <https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374>\
**Category:** Installation / Einstieg\
**Created:** [11. Juni 2025 um 14:30 UTC](https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374 "2025-06-11T14:30:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romsen](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@Romsen](https://forum.shopware.com/u/Romsen)\
**Post date:** [11. Juni 2025 um 14:30 UTC](https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374/1 "2025-06-11T14:30:28Z")

</div>

Guten Tag,  
ich möchte gerne ein Shopware Update durchführen (aktuell bin ich auf 6.6.6.1) Es schlägt aber immer fehl uns ich muss ein Backup einspielen. Sowohl im Backend als auch manuell. Es werden mehrere SQL Fehler erzeugt. Wie kann ich das lösen, ohne ganz neu zu installieren und alles neu aufzubauen?

```auto
 Get collection for identifier: "core"
migrate Migrations
 0/7 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 99.0 MiB
 1/7 [====░░░░░░░░░░░░░░░░░░░░░░░░] 14% 1 sec/7 secs 99.0 MiB14:13:10 ERROR [app] Migration: "Shopware\Core\Migration\V6_6\Migration1716968180AddAppSourceConfig" failed: "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(JSON_OBJECT())' at line 1"
 ---------- ---------------------- 
  Action Number of migrations  
 ---------- ---------------------- 
  Migrated 2 out of 7            
 ---------- ---------------------- 

14:13:10 CRITICAL [console] Error thrown while running command "database:migrate core --all=1". Message: "
Migration error: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(JSON_OBJECT())' at line 1\n
Trace: \n
#0 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1976): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()\n
#1 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1918): Doctrine\DBAL\Connection->handleDriverException()\n
#2 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1218): Doctrine\DBAL\Connection->convertExceptionDuringQuery()\n
#3 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/AddColumnTrait.php(25): Doctrine\DBAL\Connection->executeStatement()\n
#4 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Migration/V6_6/Migration1716968180AddAppSourceConfig.php(24): Shopware\Core\Framework\Migration\MigrationStep->addColumn()\n
#5 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/MigrationRuntime.php(39): Shopware\Core\Migration\V6_6\Migration1716968180AddAppSourceConfig->update()\n
#6 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(58): Shopware\Core\Framework\Migration\MigrationRuntime->migrate()\n
#7 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(160): Shopware\Core\Framework\Migration\Command\MigrationCommand->getMigrationGenerator()\n
#8 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(102): Shopware\Core\Framework\Migration\Command\MigrationCommand->runMigrationForIdentifier()\n
#9 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Command/Command.php(279): Shopware\Core\Framework\Migration\Command\MigrationCommand->execute()\n
#10 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(1047): Symfony\Component\Console\Command\Command->run()\n
#11 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(123): Symfony\Component\Console\Application->doRunCommand()\n
#12 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(316): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()\n
#13 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(77): Symfony\Component\Console\Application->doRun()\n
#14 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(157): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()\n
#15 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(119): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->runCommand()\n
#16 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(94): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->runMigrations()\n
#17 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Command/Command.php(279): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->execute()\n
#18 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(1047): Symfony\Component\Console\Command\Command->run()\n
#19 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(123): Symfony\Component\Console\Application->doRunCommand()\n
#20 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(316): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()\n
#21 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(77): Symfony\Component\Console\Application->doRun()\n
#22 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(167): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()\n
#23 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php(49): Symfony\Component\Console\Application->run()\n
#24 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run()\n
#25 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/bin/console(17): require_once('...')\n
#26 {main}
"
[
  "exception" => Shopware\Core\Framework\Migration\Exception\MigrateException {
    #message: """
      Migration error: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(JSON_OBJECT())' at line 1\n
      Trace: \n
      #0 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1976): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()\n
      #1 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1918): Doctrine\DBAL\Connection->handleDriverException()\n
      #2 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/doctrine/dbal/src/Connection.php(1218): Doctrine\DBAL\Connection->convertExceptionDuringQuery()\n
      #3 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/AddColumnTrait.php(25): Doctrine\DBAL\Connection->executeStatement()\n
      #4 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Migration/V6_6/Migration1716968180AddAppSourceConfig.php(24): Shopware\Core\Framework\Migration\MigrationStep->addColumn()\n
      #5 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/MigrationRuntime.php(39): Shopware\Core\Migration\V6_6\Migration1716968180AddAppSourceConfig->update()\n
      #6 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(58): Shopware\Core\Framework\Migration\MigrationRuntime->migrate()\n
      #7 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(160): Shopware\Core\Framework\Migration\Command\MigrationCommand->getMigrationGenerator()\n
      #8 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php(102): Shopware\Core\Framework\Migration\Command\MigrationCommand->runMigrationForIdentifier()\n
      #9 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Command/Command.php(279): Shopware\Core\Framework\Migration\Command\MigrationCommand->execute()\n
      #10 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(1047): Symfony\Component\Console\Command\Command->run()\n
      #11 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(123): Symfony\Component\Console\Application->doRunCommand()\n
      #12 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(316): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()\n
      #13 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(77): Symfony\Component\Console\Application->doRun()\n
      #14 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(157): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()\n
      #15 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(119): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->runCommand()\n
      #16 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php(94): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->runMigrations()\n
      #17 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Command/Command.php(279): Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->execute()\n
      #18 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(1047): Symfony\Component\Console\Command\Command->run()\n
      #19 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(123): Symfony\Component\Console\Application->doRunCommand()\n
      #20 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(316): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand()\n
      #21 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/framework-bundle/Console/Application.php(77): Symfony\Component\Console\Application->doRun()\n
      #22 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/console/Application.php(167): Symfony\Bundle\FrameworkBundle\Console\Application->doRun()\n
      #23 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php(49): Symfony\Component\Console\Application->run()\n
      #24 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run()\n
      #25 /var/www/vhosts/sicherheit360.de/nsc-videotechnik/bin/console(17): require_once('...')\n
      #26 {main}
      """
```

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [11. Juni 2025 um 14:36 UTC](https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374/2 "2025-06-11T14:36:42Z")

</div>

> [@Romsen](#):
>
> `1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(JSON_OBJECT())'`

Entweder nutzt du ein Drittanbieter-Plugin, das nicht aus dem Store kommt

oder

deine MySQL Version ist nicht mit Shopware kompatibel (sehr wahrscheinlich).

---

<div class="post-metadata">

**Author:** ![Romsen](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@Romsen](https://forum.shopware.com/u/Romsen)\
**Post date:** [12. Juni 2025 um 08:00 UTC](https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374/3 "2025-06-12T08:00:15Z")

</div>

Danke dir,

ja das wird es sein denn aktuell ist es SQL 5.0, was nicht mehr kompatibel ist.

Ich habe nun eine neue Datenbak mit 8.0.2 angelegt und das Backup der alten dort eingespielt. Die Zugangsdaten habe ich in der .env local angepasst aber es schlägt weiter fehl. Entweder greift Shopware weiterhin auf die falsche Datenbank zu oder es ist wegen Backup? Wie wäre die sauberste Lösung?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [12. Juni 2025 um 08:12 UTC](https://forum.shopware.com/t/update-schlaegt-fehl-sql-fehler/107374/4 "2025-06-12T08:12:44Z")

</div>

Mir ist nicht bekannt, das Shopware 6.6.6.1 noch mit MySQL 5.x kompatibel war (habe aber nicht nachgesehen). Eventuell hast du dir hier schon die Datenbank zerschossen. Wobei das eher unwahrscheinlich ist, da der Shop dann sehr wahrscheinlich nicht mehr korrekt funktioniert hätte.

8.0.2 ist aber auch schon wieder eine recht alte Version. Falls du eine 0 vergessen haben solltest, 8.0.20 ist mit Shopware nicht kompatibel.

Es kommt immer auf die Fehlermeldung an.
