MySQL Error 1105 (ER_UNKNOWN_ERROR) is a generic fallback error that occurs when the MySQL server encounters an internal failure it cannot map to a specific error code. Fix it by checking the error log for details, repairing corrupted tables, verifying plugin compatibility, and checking system resources.
ERROR 1105 (HY000): Unknown error is a generic catch-all error message that MySQL returns when the server encounters an unexpected internal condition during statement execution, startup, or replication that does not match any specific error code. This error indicates something went wrong but the server cannot provide a precise explanation—the true root cause is hidden in the MySQL error log or InnoDB status. Unlike specific errors like "Access Denied" or "Syntax Error", this generic message requires investigation of the server logs to determine what actually failed. The error is often symptomatic of deeper problems such as plugin crashes, table corruption, resource exhaustion, or version incompatibilities.
The generic "Unknown error" message hides the real cause in the error log. First, find the error log location:
SHOW VARIABLES LIKE 'log_error';Then check the error log file with details about what failed:
# On Linux/macOS
tail -100 /var/log/mysql/error.log
# Or follow it in real-time
tail -f /var/log/mysql/error.logLook for stack traces, plugin crash messages, or other specific errors near the timestamp of your Error 1105. The detailed message will point you toward the actual problem (plugin crash, corruption, etc.). Copy relevant error lines and search for solutions based on the specific message, not the generic 1105 code.
Table corruption can trigger Error 1105. Check and repair the affected tables:
-- Check table integrity
CHECK TABLE table_name;
-- If errors are found, repair the table
REPAIR TABLE table_name;For multiple tables in a database:
mysqlcheck -u root -p database_name --repairIf the table uses InnoDB (not MyISAM), try a safe repair with innodb_ruby or dump and restore:
# Dump the table
mysqldump -u root -p database_name table_name > table_backup.sql
# Drop and restore
mysql -u root -p database_name < table_backup.sqlRun the failing query again after repairs to see if the error is resolved.
After upgrading MySQL, plugins compiled for an older version may crash with Error 1105. Check loaded plugins:
SHOW PLUGINS;Identify any custom or third-party plugins. Verify they support your MySQL version by checking their documentation. If incompatible:
1. Uninstall the plugin:
UNINSTALL PLUGIN plugin_name;2. Recompile or upgrade the plugin for your MySQL version
3. Reinstall it:
INSTALL PLUGIN plugin_name SONAME 'plugin_library.so';For user-defined functions (UDFs), check that they are compiled for your MySQL version and architecture (32-bit vs 64-bit). Recompile if necessary:
gcc -fPIC -shared -o my_udf.so my_udf.c -I/usr/include/mysqlThen reinstall in MySQL and test again.
Insufficient disk space or memory can cause unexpected failures. Check available resources:
# Check disk space
df -h /var/lib/mysql
# Check memory
free -h
# Check MySQL memory usage
topIf disk is low, free up space immediately:
# Clean old binary logs (if no replication)
mysql -u root -p -e "PURGE BINARY LOGS BEFORE DATE_SUB(NOW(), INTERVAL 7 DAY);"
# Remove temporary files
rm -rf /var/lib/mysql/tmp/*If memory is constrained, increase available memory or reduce MySQL buffer pool:
[mysqld]
innodb_buffer_pool_size = 2G # Adjust based on available RAMAfter freeing resources, restart MySQL and retry the failing query:
sudo systemctl restart mysqlIf Error 1105 started after a configuration change, revert it:
# View your MySQL configuration file
cat /etc/mysql/my.cnf
# or
cat /etc/my.cnfLook for recent changes to:
- innodb_buffer_pool_size (set too high can cause memory issues)
- max_connections (too high causes resource exhaustion)
- sql_mode (incompatible settings with certain operations)
- Custom plugin options
If you made changes, revert them:
# Backup current config
cp /etc/mysql/my.cnf /etc/mysql/my.cnf.backup
# Revert to previous version from backup
cp /etc/mysql/my.cnf.old /etc/mysql/my.cnfRestart MySQL:
sudo systemctl restart mysqlTest if the error is resolved. If it is, gradually reintroduce changes in a test environment to find the problematic setting.
Reproduce the error consistently to narrow down the cause:
# Export the query to a test script
echo "SELECT * FROM problematic_table LIMIT 1;" > test_query.sql
# Run it with verbose logging to capture error details
mysql -u root -p --verbose database_name < test_query.sql 2>&1 | tee query_result.logFor replication failures:
-- Check replica status
SHOW REPLICA STATUS\G
-- If stuck on a specific event, skip it
SET GLOBAL SQL_REPLICA_SKIP_COUNTER = 1;
START REPLICA;
-- Monitor progress
SHOW REPLICA STATUS\GRun the query in isolation with minimal load to confirm it fails consistently. If it only fails under load, the issue is resource-related (see Step 4).
Error 1105 is a symptom of deeper problems, not a problem itself. Always prioritize reading the error log (from the same timestamp as the 1105 error) to find the actual cause. Common patterns: Plugin crashes usually leave stack traces in the error log; corrupted tables show specific InnoDB errors; replication issues show the failing statement with context; log file rotation failures occur due to filesystem permissions (MySQL user cannot write to /var/log). For production systems, enable error logging at WARNING level to catch problems early. Implement automated table checks via pt-table-checksum or mysqldump recovery cycles to detect corruption before it causes runtime errors. Keep plugins and UDFs in sync with MySQL versions during upgrades by testing in a staging environment first. For ProxySQL users experiencing Error 1105 during mysql_change_user() operations, update ProxySQL or adjust connection pooling settings.
ERROR 1064: You have an error in your SQL syntax
How to fix "ERROR 1064: You have an error in your SQL syntax" in MySQL
ERROR 1054: Unknown column in field list
Unknown column in field list
ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE (3589): RANGE frame requires numeric ORDER BY expression
RANGE frame requires numeric ORDER BY expression in MySQL window functions
CR_ALREADY_CONNECTED (2058): Handle already connected
How to fix "CR_ALREADY_CONNECTED (2058): Handle already connected" in MySQL
ER_WINDOW_DUPLICATE_NAME (3591): Duplicate window name
How to fix ER_WINDOW_DUPLICATE_NAME (3591) in MySQL window functions