Jump to content

Recommended Posts

Posted

DYNAMIC row format, not working with my host

#!/bin/bash

DATABASE=XXX

ROW_FORMAT=DYNAMIC
#ROW_FORMAT=COMPRESSED

TABLES=$(echo SHOW TABLES | mysql -s $DATABASE)

for TABLE in $TABLES ; do
    echo "ALTER TABLE $TABLE ROW_FORMAT=$ROW_FORMAT;"
    echo "ALTER TABLE $TABLE ROW_FORMAT=$ROW_FORMAT" | mysql $DATABASE
done

 

Posted
6 hours ago, MEVi said:

He replied that this would have to be changed for all clients, which is unthinkable.

Incorrect - Dynamic row format is a per-database feature; he probably thinks you have asked for the default setting for new tables on the server to be set to Dynamic.

Read this topic:

 

Posted

@Paul E.,

Quote

How to convert MyISAM to InnoDB?

Here is how we convert to InnoDB using phpMyAdmin and MySQL CLI. First, let’s see how we do it using phpMyAdmin.

  • First, we login to phpMyAdmin.
  • Then, check the type column and see the storage engines.
  • Later, click on the MyISAM table and click the Operations tab and change the storage engine.

Alternatively, we run the below command to change the storage engine of a particular table to InnoDB.


ALTER TABLE table_name ENGINE=InnoDB;
Posted

Bob is giving some poor advice. Don't perform schema changing SQL operations via phpMyAdmin. phpMyAdmin can be a useful tool to do some basic row level inquiries/modifications if needed and basic exploration. You should get into the habit of using a proper client on the database server itself for significant write and change commands. Changing the underlying engine of a table is a significant change. Connecting via terminal and using the mysql command would be a far better approach.

Command line documentation:
https://dev.mysql.com/doc/refman/8.0/en/mysql.html

If your host doesn't give you the option to make the row format dynamic (you may be on an older version of MySQL, and/or your database may be using the original Antelope file format and not Barracuda, the newer InnoDB file format required for dynamic row format), and you're not having issues, then you should be okay for now. It's a recommendation but not a requirement.

The steps required to do all this are going to require reading up on the documentation and better understanding your specific hosting environment. Take a look at what version of MySQL you're running, the schema properties of your database, and how the database engine is configured.

Posted (edited)

Hello @Paul E.,

almost all tables in the database are InnoDB except for core_referral_banners, core_follow, +10.

ALTER TABLE core_referral_banners ENGINE=InnoDB
ALTER TABLE core_follow ENGINE=InnoDB
... +10

 

Edited by MEVi
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...