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?
Welche PHP / MySQL Version wird eingesetzt?
PHP 7.2, MySQL Software-Version: 5.7.26-nmm1-log - (Ubuntu)
Klasse. Hat funktioniert. Danke!!
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‘“);
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
{
/\*\*
\* @throws \Exception
\* @throws \PDOException
\*
\* @return \PDO
\*/
public function createPDOConnection(DatabaseConnectionInformation $info)
{
$conn = new \PDO(
$this-\>buildDsn($info),
$info-\>username,
$info-\>password,
[
\PDO::ATTR\_ERRMODE =\> \PDO::ERRMODE\_EXCEPTION,
\PDO::ATTR\_DEFAULT\_FETCH\_MODE =\> \PDO::FETCH\_ASSOC,
\PDO::MYSQL\_ATTR\_INIT\_COMMAND =\> 'SET NAMES utf8',
]
);
$this-\>setNonStrictSQLMode($conn);
$this-\>checkVersion($conn);
$this-\>checkEngineSupport($conn);
$this-\>checkSQLMode($conn);
**$conn-\>exec("SET default\_storage\_engine=InnoDB;");
$conn-\>exec("SET names 'utf8mb4'");**
** ** return $conn;
}
PHP Version 7.2 MySQL 5.7
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.
ok ich werde mal eine komplette Neuinstallation versuchen …
Shopware wurde erfolgreich installiert ! Alles gut ! Vielen Dank für den Support.