Spdexter
Spdexter

Reputation: 933

MariaDB alter table row format doesn't work

I need to change row format of a table in MaraiaDB.##

I used ALTER TABLE table_name ROW_FORMAT=Dynamic;

But it doesn't seem to change.

Please help.

Upvotes: 4

Views: 1704

Answers (1)

Larsen
Larsen

Reputation: 432

You will need to make a dump, change it, and import the dump. Assuming it's "compact" before:

export DB=""

mysqldump -u root -p ${DB} > db_backup.sql && \
sed -i 's:ROW_FORMAT=COMPACT:ROW_FORMAT=DYNAMIC:g' db_backup.sql && \
mysql -u root -p ${DB} < db_backup.sql

Upvotes: 1

Related Questions