Error
Error Code:
1209
MariaDB Error 1209: Global Read Lock Prevents Database Creation
Description
This error indicates an attempt to create a new database while a global read lock is active on the MariaDB server. A global read lock prevents any write operations, including DDL statements like `CREATE DATABASE`, to ensure data consistency during specific maintenance or backup operations. This ensures data integrity by preventing modifications during critical periods.
Error Message
CREATE DATABASE not allowed while thread is holding global read lock
Known Causes
3 known causesManual Administration Lock
An administrator has explicitly issued `FLUSH TABLES WITH READ LOCK` or a similar command for maintenance, backup, or consistency checks.
Automated Backup in Progress
A backup utility (e.g., `mysqldump` or a similar tool) is currently running and has applied a global read lock to ensure data consistency.
Stalled Session or Unreleased Lock
A previous database session or process acquired a global read lock but terminated abnormally or failed to release the lock.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service