exp:ezconvertmysqltabletype
Available before Exponential 6: the 4.x kernel had it already; the 4.x reference had no page for it.
Summary
Convert the tables of a MySQL database to another table type (--list, --newtype=TYPE)
Usage
./console exp:ezconvertmysqltabletype [options] php bin/php/ezconvertmysqltabletype.php [options]
Help
The output of ./console help exp:ezconvertmysqltabletype (the script run with --help), without the standard options:
Usage: bin/php/ezconvertmysqltabletype.php [OPTION]...
Exponential Database Converter
Convert the database to the given type
ezconvertmysqltabletype.php [--host=VALUE --user=VALUE --database=VALUE [--password=VALUE]] [--list] [--newtype=TYPE] [--usecopy]
Options:
--host=VALUE Connect to host database
--user=VALUE User for login to the database
--password=VALUE Password to use when connecting to the database
--database=VALUE
--list List the table types
--newtype=VALUE Convert the database to the given type.
Type can either be: myisam or innodb
Make sure that you have made a BACKUP UP of YOUR DATABASE!
--usecopy To convert the table we rename the original table and copy the data to the new table structure.
This conversion method is much slower and has a higher risk to corrupt the data in the database.
However this option may circumvent the MySQL crash on the ALTER query.Options
| Option | Value | Description |
|---|---|---|
| --host | required | Connect to host database |
| --user | required | User for login to the database |
| --password | required | Password to use when connecting to the database |
| --database | required | |
| --list | - | List the table types |
| --newtype | required | Convert the database to the given type. Type can either be: myisam or innodb Make sure that you have made a BACKUP UP of YOUR DATABASE! |
| --usecopy | - | To convert the table we rename the original table and copy the data to the new table structure. This conversion method is much slower and has a higher risk to corrupt the data in the database. However this option may circumvent the MySQL crash on the ALTER query. |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/ezconvertmysqltabletype.php, kernel/private/classes/commands/ezconvertmysqltabletype.php
See also
Generated example: exp:ezconvertmysqltabletype
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment