# Upgrade to Nextcloud Hub 10 (31.0.0) Incorrect row format found in your database

**URL:** <https://help.nextcloud.com/t/upgrade-to-nextcloud-hub-10-31-0-0-incorrect-row-format-found-in-your-database/218366>\
**Category:** ℹ️ Support\
**Tags:** database, mysql, nc31, setup\_warning\
**Created:** [February 25, 2025, 5:50pm UTC](https://help.nextcloud.com/t/upgrade-to-nextcloud-hub-10-31-0-0-incorrect-row-format-found-in-your-database/218366 "2025-02-25T17:50:39Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![YannicK\_SupRavII](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yannick_supravii/32/64196_2.png) [@YannicK\_SupRavII](https://help.nextcloud.com/u/YannicK_SupRavII)\
**Post date:** [February 26, 2025, 9:41pm UTC](https://help.nextcloud.com/t/upgrade-to-nextcloud-hub-10-31-0-0-incorrect-row-format-found-in-your-database/218366/13 "2025-02-26T21:41:37Z")

</div>

Hello,  
Your script changes the ROW\_FORMAT of the InnoDB tables to DYNAMIC, but it has a problem: it generates the queries in a first mysql -e and then executes them separately in a loop, which can be problematic if the password is asked for each query. Here is an optimized version that executes everything in one command:

```auto
#!/bin/bash

# Prompt for database credentials
read -p "Enter Database Name: " DB_NAME
read -p "Enter Username: " DB_USER
read -s -p "Enter Password: " DB_PASS
echo

# Execute all ALTER TABLE statements in one query
mysql -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" -Bse "
SELECT CONCAT('ALTER TABLE \`', TABLE_NAME, '\` ROW_FORMAT=DYNAMIC;') 
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_SCHEMA = '$DB_NAME' 
AND ENGINE = 'InnoDB'
" | mysql -u "$DB_USER" -p"$DB_PASS" "$DB_NAME"

```

This version avoids the loop and executes the queries directly, thus improving efficiency. 🗯

---

_[View the full topic](https://help.nextcloud.com/t/upgrade-to-nextcloud-hub-10-31-0-0-incorrect-row-format-found-in-your-database/218366)._
