# Shopware 6 - General error: 1215

**URL:** <https://forum.shopware.com/t/shopware-6-general-error-1215/60512>\
**Category:** Installation / Einstieg\
**Created:** [18. Juli 2019 um 09:30 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512 "2019-07-18T09:30:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gumpo011](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gumpo011](https://forum.shopware.com/u/gumpo011)\
**Post date:** [18. Juli 2019 um 09:30 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/1 "2019-07-18T09:30:06Z")

</div>

Hallo,

folgende Fehlermeldung kommt bei Schritt 70:

* * *

Error

Received an error message.  
**URL:** importDatabase  
**Message:** Internal Server Error

Please try to fix this error and restart the update.

Response

```
 {"valid":false,"errorMsg":"An exception occurred while executing '\n CREATE TABLE `custom_field` (\n `id` BINARY(16) NOT NULL PRIMARY KEY,\n `name` VARCHAR(255) NOT NULL,\n `type` VARCHAR(255) NOT NULL,\n `config` JSON NULL,\n `active` TINYINT(1) NOT NULL DEFAULT 1,\n `set_id` BINARY(16) NULL,\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n CONSTRAINT `uniq.custom_field.name` UNIQUE (`name`),\n CONSTRAINT `json.custom_field.config` CHECK(JSON\_VALID(`config`)),\n CONSTRAINT `fk.custom_field.set_id` FOREIGN KEY (set\_id)\n REFERENCES `custom_field_set` (id) ON UPDATE CASCADE ON DELETE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4\_unicode\_ci;\n ':\n\nSQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint"}

```

* * *

Server allinkl. Was ist hier zu tun?

---

<div class="post-metadata">

**Author:** ![AndreHerking](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/andreherking/32/7839_2.png) [@AndreHerking](https://forum.shopware.com/u/AndreHerking)\
**Post date:** [18. Juli 2019 um 09:33 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/2 "2019-07-18T09:33:21Z")

</div>

Welche PHP / MySQL Version wird eingesetzt?

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [18. Juli 2019 um 09:37 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/3 "2019-07-18T09:37:43Z")

</div>

[https://issues.shopware.com/issues/NEXT-4072](https://issues.shopware.com/issues/NEXT-4072)

Das ist aktuell bei Allinkl. ein Problem.

---

<div class="post-metadata">

**Author:** ![gumpo011](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gumpo011](https://forum.shopware.com/u/gumpo011)\
**Post date:** [18. Juli 2019 um 09:38 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/4 "2019-07-18T09:38:06Z")

</div>

PHP 7.2, MySQL Software-Version: 5.7.26-nmm1-log - (Ubuntu)

---

<div class="post-metadata">

**Author:** ![gumpo011](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gumpo011](https://forum.shopware.com/u/gumpo011)\
**Post date:** [18. Juli 2019 um 09:52 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/5 "2019-07-18T09:52:17Z")

</div>

Klasse. Hat funktioniert. Danke!!

---

<div class="post-metadata">

**Author:** ![Dennis1108](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Dennis1108](https://forum.shopware.com/u/Dennis1108)\
**Post date:** [18. Juli 2019 um 12:22 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/6 "2019-07-18T12:22:57Z")

</div>

Moin,

habe dasselbe Problem wie gumpo011 bei alfahosting auch.

Habe wie im Ticket beschrieben folgendes eingefügt

$conn-\>exec(„SET default\_storage\_engine=InnoDB;“); $conn-\>exec(„SET names ‚utf8mb4‘“);

&nbsp;

Bekomme jetzt aber folgende Fehlermeldung:

**Fatal error** : Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ‚web27537623‘@‚localhost‘ (using password: YES) in /var/www/web27537623/html/shopware/public/recovery/install/src/DatabaseFactory.php:22 Stack trace: #0 /var/www/web27537623/html/shopware/public/recovery/install/src/DatabaseFactory.php(22): PDO-\>\_\_construct(‚mysql:host=loca…‘, ‚web27537623‘, ‚passwort‘, Array) #1 /var/www/web27537623/html/shopware/public/recovery/install/src/app.php(49): Shopware\Recovery\Install\DatabaseFactory-\>createPDOConnection(Object(Shopware\Recovery\Install\Struct\DatabaseConnectionInformation)) #2 /var/www/web27537623/html/shopware/public/recovery/install/index.php(50): require(’/var/www/web275…’) #3 {main} thrown in **/var/www/web27537623/html/shopware/public/recovery/install/src/DatabaseFactory.php** on line **22**

DatabaseFactory.php sieht jetzt so aus\_

\<?php declare(strict\_types=1); namespace Shopware\Recovery\Install; use Shopware\Recovery\Install\Struct\DatabaseConnectionInformation; class DatabaseFactory { &nbsp;&nbsp;&nbsp; /\*\* &nbsp;&nbsp;&nbsp;&nbsp; \* @throws \Exception &nbsp;&nbsp;&nbsp;&nbsp; \* @throws \PDOException &nbsp;&nbsp;&nbsp;&nbsp; \* &nbsp;&nbsp;&nbsp;&nbsp; \* @return \PDO &nbsp;&nbsp;&nbsp;&nbsp; \*/ &nbsp;&nbsp;&nbsp; public function createPDOConnection(DatabaseConnectionInformation $info) &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $conn = new \PDO( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-\\>buildDsn($info), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $info-\\>username, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $info-\\>password, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \PDO::ATTR\_ERRMODE =\\> \PDO::ERRMODE\_EXCEPTION, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \PDO::ATTR\_DEFAULT\_FETCH\_MODE =\\> \PDO::FETCH\_ASSOC, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \PDO::MYSQL\_ATTR\_INIT\_COMMAND =\\> 'SET NAMES utf8', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-\\>setNonStrictSQLMode($conn); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-\\>checkVersion($conn); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-\\>checkEngineSupport($conn); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-\\>checkSQLMode($conn); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \*\*$conn-\\>exec("SET default\_storage\_engine=InnoDB;"); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $conn-\\>exec("SET names 'utf8mb4'");\*\* \*\*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\*\* return $conn; &nbsp;&nbsp;&nbsp; } &nbsp; PHP Version 7.2 MySQL 5.7 &nbsp;

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [18. Juli 2019 um 12:48 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/7 "2019-07-18T12:48:13Z")

</div>

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ‘web27537623’@‘localhost’ (using password: YES)

Klingt erstmal so, als wäre dein Passwort falsch oder der User.

---

<div class="post-metadata">

**Author:** ![Dennis1108](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Dennis1108](https://forum.shopware.com/u/Dennis1108)\
**Post date:** [18. Juli 2019 um 13:45 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/8 "2019-07-18T13:45:14Z")

</div>

ok ich werde mal eine komplette Neuinstallation versuchen …&nbsp;

---

<div class="post-metadata">

**Author:** ![Dennis1108](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Dennis1108](https://forum.shopware.com/u/Dennis1108)\
**Post date:** [18. Juli 2019 um 14:40 UTC](https://forum.shopware.com/t/shopware-6-general-error-1215/60512/9 "2019-07-18T14:40:14Z")

</div>

Shopware wurde erfolgreich installiert ! Alles gut ! Vielen Dank für den Support.
