Error
Error Code:
3003
MySQL Error 3003: Storage Engine Not Loaded
Description
This error indicates that MySQL attempted to use a specific storage engine for a table, but that engine was not available or failed to load within the current server instance. This typically occurs when creating, altering, or accessing a table configured for an engine that is not enabled or properly installed.
Error Message
Storage engine for table '%s'.'%s' is not loaded.
Known Causes
3 known causesStorage Engine Disabled
The required storage engine (e.g., InnoDB, MyISAM) is explicitly disabled in the MySQL configuration or was not compiled into the server build.
Plugin Not Installed/Loaded
If the storage engine is implemented as a plugin, its files might be missing from the plugin directory or the plugin failed to load during server startup.
Incorrect Configuration File
The `my.cnf` or `my.ini` configuration file might contain errors preventing the engine from loading or specify incorrect plugin paths.
Solutions
3 solutions available1. Verify and Load Storage Engine medium
Ensure the storage engine required by the table is enabled in the MySQL configuration.
1
Identify the storage engine of the problematic table. You can usually find this by running a `SHOW CREATE TABLE` statement.
SHOW CREATE TABLE `your_database`.`your_table`;
2
Check if the identified storage engine is enabled in your MySQL server configuration. Look for `plugin-load` or `plugin-dir` directives in your `my.cnf` or `my.ini` file. For example, to load the InnoDB engine, ensure there isn't a directive disabling it, or explicitly load it if necessary (though InnoDB is usually loaded by default). For other engines like MyISAM, check if they are commented out or disabled.
# Example for my.cnf:
# plugin-load = "innodb=ha_innodb.so"
# plugin-dir = /usr/lib/mysql/plugin/
3
If the storage engine is not loaded or is explicitly disabled, uncomment or add the relevant lines to your MySQL configuration file.
4
Restart the MySQL server for the configuration changes to take effect.
# On systems using systemd:
sudo systemctl restart mysqld
# On systems using init.d:
sudo service mysql restart
5
After restarting, try accessing the table again. If the issue persists, consider rebuilding the table with a known-loaded engine.
2. Rebuild Table with a Supported Engine easy
Convert the table to a storage engine that is guaranteed to be loaded.
1
Identify the problematic table and its current storage engine (as described in Solution 1).
SHOW CREATE TABLE `your_database`.`your_table`;
2
Alter the table to use a reliably loaded storage engine like InnoDB (which is typically enabled by default). This will create a new table with the specified engine, copy the data, and then rename the tables.
ALTER TABLE `your_database`.`your_table` ENGINE=InnoDB;
3
Verify that the table can now be accessed and that all data is intact.
SELECT COUNT(*) FROM `your_database`.`your_table`;
3. Check for Corrupted Table Files advanced
Investigate if the table's data files are missing or corrupted, leading to the engine not being able to load them.
1
Locate the MySQL data directory on your server. This is usually specified by the `datadir` variable in your MySQL configuration.
SHOW VARIABLES LIKE 'datadir';
2
Navigate to the subdirectory corresponding to your database within the data directory.
cd /var/lib/mysql/your_database/
3
Look for the files associated with the problematic table (e.g., `your_table.frm`, `your_table.ibd` for InnoDB, or `your_table.MYD`, `your_table.MYI` for MyISAM).
ls -l your_table.*
4
If any of these files are missing, have zero size, or show signs of corruption (e.g., inconsistent timestamps), it indicates a serious data loss or corruption issue. You may need to restore from a backup.
5
If the files appear intact but the error persists, it might be a more subtle corruption. You can try to repair the table if it's a MyISAM table.
REPAIR TABLE `your_database`.`your_table`;
6
For InnoDB, if corruption is suspected and backups are available, restoring from a backup is the most reliable solution. If no backup is available, you might consider advanced recovery tools, but proceed with extreme caution.