# Datenbank versehentlich gelöscht?

**URL:** https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165
**Category:** Programmierung
**Created:** [20. Juni 2023 um 06:13 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165 "2023-06-20T06:13:59Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 06:13 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/1 "2023-06-20T06:13:59Z")

</div>

Moin Moin,

folgendes ist mir versehentlich passiert:

Durch löschen von Matomo, wurde auch die Shop Datenbank versehentlich gelöscht. Leider hatte ich die Daten der Datenbank nicht mehr, so dass ich eine neue Datenbank erzeugen musste und die Daten aus dem Backup wieder einspielen musste.

Nur habe ich die Daten für Datenbank und den Datenbankbenutzer nicht mehr, so das neue Erzeigt wurden.

Jetzt habe ich diesen Fehler:

# Oops! An Error Occurred

## The server returned a „500 Internal Server Error“.

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Wie bekomme ich das wieder geflickt?

Vielen Dank für eure Hilfe!

MfG R. Amend

---

<div class="post-metadata">

### Author: ![stan\_o](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@stan\_o](https://forum.shopware.com/u/stan_o)
#### Post date: [20. Juni 2023 um 06:33 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/2 "2023-06-20T06:33:45Z")

</div>

Musst in der ENV die neue Datenbank, Nutzer und PW eintragen wenn ich dein Problem richtig verstehe

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 06:52 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/3 "2023-06-20T06:52:47Z")

</div>

Shopware 6.5.2.1

Ok, aber wo und wie in der ENV siehe meine ENV?

```auto
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

###> shopware/core ###
APP_ENV=prod
APP_URL=http://127.0.0.1:8000
APP_SECRET=9435563782676e1dbc09f9f0f7a29
INSTANCE_ID=063847839908efec6ca9
BLUE_GREEN_DEPLOYMENT=0
DATABASE_URL=mysql://root:root@localhost/shopware
# With Shopware 6.4.17.0 the MAILER_DSN variable will be used in this template instead of MAILER_URL
MAILER_URL=null://null
###< shopware/core ###

###> shopware/elasticsearch ###
OPENSEARCH_URL=http://localhost:9200
SHOPWARE_ES_ENABLED=0
SHOPWARE_ES_INDEXING_ENABLED=0
SHOPWARE_ES_INDEX_PREFIX=sw
SHOPWARE_ES_THROW_EXCEPTION=1
###< shopware/elasticsearch ###

###> shopware/storefront ###
STOREFRONT_PROXY_URL=http://localhost
SHOPWARE_HTTP_CACHE_ENABLED=1
SHOPWARE_HTTP_DEFAULT_TTL=7200
###< shopware/storefront ###

###> symfony/lock ###
# Choose one of the stores below
# postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock
###< symfony/lock ###

###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
# doctrine://default?auto_setup=0
###< symfony/messenger ###

```

---

<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: [20. Juni 2023 um 06:55 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/4 "2023-06-20T06:55:03Z")

</div>

> [@RAShop](#):
>
> `DATABASE_URL=mysql://root:root@localhost/shopware`

Benutzernamen, Passwort, Host, Datenbank.

Das ganze ist urlencoded bei Sonderzeichen!

---

<div class="post-metadata">

### Author: ![stan\_o](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@stan\_o](https://forum.shopware.com/u/stan_o)
#### Post date: [20. Juni 2023 um 06:59 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/5 "2023-06-20T06:59:27Z")

</div>

> [@Datenbank Passwort in der .env richtig escapen](https://forum.shopware.com/t/datenbank-passwort-in-der-env-richtig-escapen/91906):
>
> Hallo zusammen, da sich unser Shop Datenbank Password geändert hat, habe ich dieses in der .env angepasst. In den Docs steht das folgende Stelle angepasst werden muss: DATABASE\_URL=mysql://user:passwort@localhost:3306/testshop Wenn ich nun das Passwort an der richtigen Stelle ändere ist der Shop nicht mehr aufrufbar. Das scheint an Sonderzeichen im Passwort zu liegen, denn bei einem Passwort ohne Sonderzeichen funktioniert der Shop. Wenn ich den bisherigen .env Eintrag mit dem alten Passwort…

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 07:13 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/6 "2023-06-20T07:13:47Z")

</div>

Erstmal Danke, aber ich brauche da mehr Info, wie erzeuge ich urlancode mit Sonderzeichen und ist das dann alles in einer Reihe geschrieben?

Beispiel Klartext: admin636 | %F/637 | admin636 | usw.

Wo muss das rein? DATABASE\_URL=mysql://root:root@localhost/shopware

Und einzeln hintereinander? Kann man jemand ein Beispiel machen!

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 07:45 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/7 "2023-06-20T07:45:02Z")

</div>

Wie Codiere ich das mit [https://www.urlencoder.org/](https://www.urlencoder.org/)?

---

<div class="post-metadata">

### Author: ![stan\_o](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@stan\_o](https://forum.shopware.com/u/stan_o)
#### Post date: [20. Juni 2023 um 07:55 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/8 "2023-06-20T07:55:50Z")

</div>

DATABASE\_URL=mysql://username:passwort@Datenbankserver(bekommst Du beim Host)/Datenbankname

In einem durch ohne Leerzeichen usw.

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 08:11 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/9 "2023-06-20T08:11:12Z")

</div>

@stan_o

Ich muss alles selbst machen VPS.

Das habe ich drin und habe erstmal auf Sonderzeichen verzichtet. Auch die Daten sind fake für die Darstellung. So sieht es aus. Die Datenbank wurde vollständig übertragen.

DATABASE\_URL=mysql://shoponline:ZgRji87Fru4@localhost:3306/shoponline

Und trotzdem habe ich den Fehler wie oben angegeben! Und jetzt?

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 08:20 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/10 "2023-06-20T08:20:29Z")

</div>

Ich denke, dass die Datenbank Daten nicht stimmen. Es hätten doch die alten drin sein müssen und nicht root:root etc.! Oder?

---

<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: [20. Juni 2023 um 08:30 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/11 "2023-06-20T08:30:29Z")

</div>

> [@RAShop](#):
>
> Ich muss alles selbst machen VPS.

Neutrale Frage: wieso nutzt du einen VPS, wenn du anscheinend nicht einmal mit den Basics vertraut bist. Das ist in jeder Hinsicht, auch Richtung DSGVO, echt riskant.

---

<div class="post-metadata">

### Author: ![stan\_o](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@stan\_o](https://forum.shopware.com/u/stan_o)
#### Post date: [20. Juni 2023 um 08:34 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/12 "2023-06-20T08:34:41Z")

</div>

Sehe grade das in unserem laufenden Testshop 6.5.2 tatsächlich auch DATABASE\_URL=mysql://root:root@localhost/shopware  
steht. Bin jetzt grade selbst verwirrt wo er sich dann die Daten ablegt. in der Mipa mal genauer schauen Oo

---

<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: [20. Juni 2023 um 08:38 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/13 "2023-06-20T08:38:46Z")

</div>

In 6.5 gibt es eine .env.local, da sind die personalisierten Werte drin.

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 08:40 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/14 "2023-06-20T08:40:26Z")

</div>

Danke, für die Nachricht. Man lernt!  
Ganz so ist es nicht. Aber das Problem beschäftigt mich.

In der .env unter  
DATABASE\_URL=mysql://root:root@localhost/shopware  
steht es genauso schon immer drin.

Da müssten doch die vorherigen Daten stehen. Also muss das wo anders stehen oder?

---

<div class="post-metadata">

### Author: ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)
#### Post date: [20. Juni 2023 um 08:44 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/15 "2023-06-20T08:44:11Z")

</div>

Falls Du Shopware 6.5.x.x verwendest, stehen die Daten in der .env.local

---

<div class="post-metadata">

### Author: ![stan\_o](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@stan\_o](https://forum.shopware.com/u/stan_o)
#### Post date: [20. Juni 2023 um 08:47 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/16 "2023-06-20T08:47:35Z")

</div>

Ah jup in der steht auch alles drin bei uns.  
Danke voll ignoriert gehabt die Datei.

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 08:47 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/17 "2023-06-20T08:47:52Z")

</div>

Oh, da hatte ich vorhin auch schon geschaut, leider Blind, nicht gesehen. Aber jetzt sind die Daten richtig drin.

Die Daten habe ich jetzt richtig drin. Trotzdem kommt Oops! An Error Occurred

---

<div class="post-metadata">

### Author: ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)
#### Post date: [20. Juni 2023 um 08:57 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/18 "2023-06-20T08:57:02Z")

</div>

Kommst Du denn in´s Backend ? Falls ja, evtl. mal den Shopware Cache löschen und/oder den Verkaufskanal nochmal zuweisen.

---

<div class="post-metadata">

### Author: ![RAShop](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/rashop/32/24484_2.png) [@RAShop](https://forum.shopware.com/u/RAShop)
#### Post date: [20. Juni 2023 um 09:02 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/19 "2023-06-20T09:02:06Z")

</div>

Backend auch Oops! An Error Occurred

Ich Spiele mal die gesamte Backup Daten drauf FTP und die Datenbank ist schon drauf.

---

<div class="post-metadata">

### Author: ![area-net-gmbh](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/area-net-gmbh/32/21995_2.png) [@area-net-gmbh](https://forum.shopware.com/u/area-net-gmbh)
#### Post date: [20. Juni 2023 um 11:00 UTC](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165/20 "2023-06-20T11:00:10Z")

</div>

Wollte ich auch gerade schreiben…

[Nächste Seite](https://forum.shopware.com/t/datenbank-versehentlich-geloescht/100165.md?page=2)
