Error
Error Code:
1478
MySQL Error 1478: Unsupported Create Option
Description
This error indicates that a `CREATE TABLE` or `ALTER TABLE` statement is attempting to use an option that is not supported by the specified or default storage engine. It typically occurs when trying to apply engine-specific features to an incompatible engine, preventing the table operation from succeeding.
Error Message
Table storage engine '%s' does not support the create option '%s'
Known Causes
4 known causesUsing Engine-Specific Options
Attempting to use a `CREATE TABLE` option (e.g., `DATA DIRECTORY`, `ENCRYPTION`) that is only supported by a particular storage engine, but the table is being created with a different, incompatible engine.
Mismatched Storage Engine
The `ENGINE` clause in the `CREATE TABLE` statement might specify an engine that does not support a subsequent option, or the server's default engine is incompatible with the chosen option.
Deprecated or Unsupported Option
The specified `CREATE TABLE` option might be deprecated or completely unsupported by the current MySQL server version or the chosen storage engine.
Typographical Error in Option
A simple typo in the `CREATE TABLE` option name can lead MySQL to interpret it as an unsupported option for the chosen storage engine.
Solutions
3 solutions available1. Remove Unsupported Create Option easy
Identify and remove the problematic create option from your table definition.
1
Examine the `CREATE TABLE` statement that resulted in the error. Look for options that are not standard for the storage engine you are using (e.g., `ENGINE=InnoDB`, `ENGINE=MyISAM`). Common unsupported options include specific `ROW_FORMAT` settings for engines that don't support them, or certain `KEY_BLOCK_SIZE` values.
2
Remove the unsupported create option from the `CREATE TABLE` statement. For example, if you see `ROW_FORMAT=COMPRESSED` and your engine doesn't support it, simply delete that part of the statement.
CREATE TABLE my_table (
id INT PRIMARY KEY,
data VARCHAR(255)
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; -- Remove ROW_FORMAT=COMPRESSED if not supported
3
Re-execute the corrected `CREATE TABLE` statement.
2. Specify a Supported Storage Engine medium
Change the storage engine to one that supports the desired create options.
1
Identify the create option that is causing the error. Consult the MySQL documentation for your specific version to determine which storage engines support that option.
2
Modify your `CREATE TABLE` statement to explicitly specify a storage engine that supports the option. For instance, if you're trying to use a specific `ROW_FORMAT` like `COMPRESSED` and `InnoDB` doesn't support it in your version, you might need to explore other options or check for specific InnoDB configurations.
CREATE TABLE my_table (
id INT PRIMARY KEY,
data VARCHAR(255)
) ENGINE=MYISAM KEY_BLOCK_SIZE=1024; -- If MYISAM supports KEY_BLOCK_SIZE and you want to use it
3
If the option is crucial and no readily available storage engine supports it with your current MySQL setup, consider upgrading your MySQL version or exploring alternative solutions for data compression or other features.
4
Re-execute the `CREATE TABLE` statement with the chosen supported storage engine.
3. Upgrade MySQL Version advanced
Update to a newer MySQL version that supports the create option.
1
Determine the MySQL version you are currently running using the following command:
SELECT VERSION();
2
Research the MySQL release notes for newer versions to see if the unsupported create option has been added or is now supported by your desired storage engine.
3
Plan and execute a MySQL upgrade according to the official MySQL documentation for your operating system. This typically involves backing up your data, installing the new MySQL version, and performing a data migration.
4
Once the upgrade is complete, attempt to run your `CREATE TABLE` statement with the desired create option again.