DEBUG: MySQL-Fehlermeldungen anzeigen für bessere Fehlersuche

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
wralto-user-1
2026-10-31 14:28:05 +01:00
parent 353e0bd085
commit 2186ef6a74

View File

@ -95,10 +95,15 @@ list_all_rooms() {
echo ""
# MySQL-Befehl direkt ausführen
mysql -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" -e "SELECT token AS Token, name AS Name, type AS Typ, id AS ID FROM \`$table_name\` ORDER BY name ASC" 2>/dev/null > "$output_file"
mysql -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" -e "SELECT token AS Token, name AS Name, type AS Typ, id AS ID FROM \`$table_name\` ORDER BY name ASC" > "$output_file" 2>"$output_file.err"
if [ $? -ne 0 ]; then
if [ $? -ne 0 ] || [ ! -s "$output_file" ]; then
echo -e "${RED}Fehler: Konnte nicht auf die Datenbank zugreifen!${NC}"
if [ -s "$output_file.err" ]; then
echo -e "${RED}MySQL-Fehler:${NC}"
cat "$output_file.err"
rm -f "$output_file.err"
fi
echo -e "Versuche alternative Tabellennamen..."
# Alternative Tabellen versuchen