Error
Error Code: 1286

MySQL Error 1286: Unknown Storage Engine

📦 MySQL
📋

Description

This error occurs when MySQL encounters a request to use a storage engine that it does not recognize or that is not available on the current server instance. It typically appears during table creation (`CREATE TABLE`), modification (`ALTER TABLE`), or when setting a session/global default storage engine.
💬

Error Message

Unknown storage engine '%s'
🔍

Known Causes

4 known causes
⚠️
Incorrect Engine Name
The specified storage engine name contains a typo or misspelling, causing MySQL to fail to recognize it.
⚠️
Engine Not Enabled
The requested storage engine (e.g., InnoDB, MyISAM) is not installed, compiled into, or enabled in the current MySQL server configuration.
⚠️
Version Incompatibility
The storage engine you are trying to use might be deprecated or not supported by your current MySQL server version.
⚠️
Missing Plugin Engine
For storage engines implemented as plugins, the necessary plugin file might be missing or not loaded correctly by the MySQL server.
🛠️

Solutions

4 solutions available

1. Verify and Enable Storage Engine medium

Check if the storage engine is available and enabled in your MySQL configuration.

1
Connect to your MySQL server using a client like `mysql` command-line tool or MySQL Workbench.
mysql -u your_user -p
2
Check if the storage engine is available by querying the `information_schema.ENGINES` table.
SELECT ENGINE, SUPPORT FROM information_schema.ENGINES WHERE ENGINE = 'your_storage_engine_name';
3
If `SUPPORT` is not 'YES', you need to enable it. This usually involves modifying your MySQL configuration file (`my.cnf` or `my.ini`). Locate the `[mysqld]` section and add or uncomment the relevant `plugin-load` directive. For example, to enable InnoDB if it's missing:
[mysqld]
plugin-load=innodb=ha_innodb.so
4
Restart the MySQL server for the configuration changes to take effect.
sudo systemctl restart mysql
5
Re-run the query or operation that caused the error to confirm the engine is now recognized.
SHOW ENGINES;

2. Correct Typo in Storage Engine Name easy

The error message often contains a placeholder ('%s'), indicating a typo in the engine name used in your SQL statement.

1
Carefully review the SQL statement that triggered the error. Look for the `ENGINE = '...'` or `DEFAULT CHARSET = ...` clauses, or any mention of a storage engine.
CREATE TABLE my_table (id INT PRIMARY KEY) ENGINE = 'myisammm'; -- Example with typo
2
Compare the specified storage engine name with a list of supported engines. You can get this list by running:
SHOW ENGINES;
3
Correct any spelling mistakes in your SQL statement. For example, 'MYISAMMM' should likely be 'MYISAM'.
CREATE TABLE my_table (id INT PRIMARY KEY) ENGINE = 'MYISAM';

3. Ensure Storage Engine is Not Disabled medium

Some storage engines can be explicitly disabled in the MySQL configuration.

1
Locate your MySQL configuration file (`my.cnf` or `my.ini`).
2
Within the `[mysqld]` section, look for directives that might disable specific storage engines. For example, `skip-innodb` would disable InnoDB. Ensure such lines are commented out or removed.
[mysqld]
# skip-innodb
3
If you find a disabling directive for the storage engine you intend to use, remove or comment it out.
4
Restart the MySQL server after modifying the configuration file.
sudo systemctl restart mysql

4. Upgrade MySQL Version or Recompile with Engine Support advanced

In rare cases, the storage engine might not be compiled into your MySQL binary or is not supported in your current version.

1
Check the MySQL documentation for your specific version to confirm if the desired storage engine is supported and included by default.
2
If the storage engine is an optional plugin and was not compiled in, you might need to recompile MySQL from source with the appropriate configuration flags. This is a complex process and generally only recommended if other solutions fail.
3
Alternatively, consider upgrading to a newer version of MySQL where the storage engine is natively supported or available as a standard plugin.
4
Always back up your data before performing major upgrades or recompilations.
🔗

Related Errors

5 related errors