Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 4

2023-09-06 20:03:06 tienda_colchas_db | 2023-09-07T01:03:06.

361632Z 0 [Warning] [MY-011068]


[Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please
use SET GLOBAL host_cache_size=0 instead. 2023-09-06 20:03:06 tienda_colchas_db | 2023-09-
07T01:03:06.362947Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.34) starting as
process 202 2023-09-06 20:03:06 tienda_colchas_db | 2023-09-07T01:03:06.373718Z 1 [System]
[MY-013576] [InnoDB] InnoDB initialization has started. 2023-09-06 20:03:06 tienda_colchas_db |
2023-09-07T01:03:06.385745Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11
2023-09-06 20:03:07 tienda_colchas_db | 2023-09-07T01:03:07.386110Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:08 tienda_colchas_db | 2023-09-
07T01:03:08.386453Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:09 tienda_colchas_db | 2023-09-07T01:03:09.386815Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:10 tienda_colchas_db | 2023-09-
07T01:03:10.387102Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:11 tienda_colchas_db | 2023-09-07T01:03:11.387516Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:12 tienda_colchas_db | 2023-09-
07T01:03:12.387933Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:13 tienda_colchas_db | 2023-09-07T01:03:13.388413Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:14 tienda_colchas_db | 2023-09-
07T01:03:14.388854Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:15 tienda_colchas_db | 2023-09-07T01:03:15.389137Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:16 tienda_colchas_db | 2023-09-
07T01:03:16.389548Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:17 tienda_colchas_db | 2023-09-07T01:03:17.390003Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:18 tienda_colchas_db | 2023-09-
07T01:03:18.390390Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:19 tienda_colchas_db | 2023-09-07T01:03:19.390769Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:20 tienda_colchas_db | 2023-09-
07T01:03:20.391234Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:21 tienda_colchas_db | 2023-09-07T01:03:21.391409Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:22 tienda_colchas_db | 2023-09-
07T01:03:22.391984Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:23 tienda_colchas_db | 2023-09-07T01:03:23.392468Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:24 tienda_colchas_db | 2023-09-
07T01:03:24.392979Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:25 tienda_colchas_db | 2023-09-07T01:03:25.393324Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:26 tienda_colchas_db | 2023-09-
07T01:03:26.393693Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:27 tienda_colchas_db | 2023-09-07T01:03:27.393933Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:28 tienda_colchas_db | 2023-09-
07T01:03:28.394153Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 2023-
09-06 20:03:29 tienda_colchas_db | 2023-09-07T01:03:29.394590Z 1 [ERROR] [MY-012574]
[InnoDB] Unable to lock ./ibdata1 error: 11 2023-09-06 20:03:30 tienda_colchas_db | 2023-09-
07T01:03:30.394854Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11 """

The error message you're encountering, "Unable to lock ./ibdata1 error: 11," suggests that there might
be an issue with InnoDB initialization in your MySQL container. Error code 11 typically indicates a
file system-related error (EAGAIN: Resource temporarily unavailable).

Here are a few steps you can take to address this issue:

1. Check Permissions: Ensure that the user running the MySQL container has the necessary
permissions to access and write to the directories and files involved. Double-check that the
volumes you've mounted in your docker-compose.yml file have the correct
permissions.

2. File Locks: The error is related to locking the InnoDB data file (ibdata1). Make sure that
there are no other processes or containers accessing the same data directory concurrently.
Multiple instances of MySQL trying to access the same data directory can lead to file lock
conflicts.

3. Container Cleanup: If you've attempted to start the MySQL container multiple times with the
same data directory, it's possible that the previous container instances have not been properly
terminated. You can stop and remove all existing MySQL containers using the following
commands:
bashCopy code
docker stop tienda_colchas_db
docker rm tienda_colchas_db

After removing the containers, try starting the MySQL container again with docker-
compose up.

4. Host File System: If your host machine is running low on disk space or experiencing other file
system issues, it can cause problems when initializing databases. Ensure that your host
machine has enough disk space and is functioning correctly.

5. MySQL Configuration: Review your MySQL configuration settings in mysql-


config.cnf to make sure there are no conflicting settings or unusual configurations that
might be causing this issue.
If the issue persists after checking these points, you may want to provide more details about your
system setup and configurations, which could help diagnose the problem further. Additionally,
checking the MySQL container's logs for any additional error messages might provide more specific
clues about the issue.

this is my docker-compose.yml file: """ version: '3' services: tienda_colchas_db: image: mysql:8.0
container_name: tienda_colchas_db environment: MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: database_name MYSQL_USER: db_user MYSQL_PASSWORD:
db_password ports: - "3306:3306" volumes: - ./database:/docker-entrypoint-initdb.d - ./docker/mysql-
config.cnf:/etc/mysql/conf.d/mysql-config.cnf """ this is the database-entrypoint.sh, is located in
the ./database/ directory: """ #!/bin/bash set -e # Start the MySQL server mysqld & # Wait for the
MySQL server to start while ! mysqladmin ping -h127.0.0.1 --silent; do sleep 1 done # Execute the
orchestrator.sql script and other SQL files mysql -h127.0.0.1 -uroot -p$
{MYSQL_ROOT_PASSWORD} < /docker-entrypoint-initdb.d/database/orchestrator.sql mysql -
h127.0.0.1 -uroot -p${MYSQL_ROOT_PASSWORD} < /docker-entrypoint-initdb.d/database/other-
script.sql # Keep the container running tail -f /dev/null """ the idea is to first execute this file: """
/**********************************************************************************
************** Description: sql script to create the scheme and grant user author: Andres Felipe
Wilches Torres @AndresFWilT Date: 14/05/2023 Client: Tienda colchas - Alex @copyright:
@AndresFWilT - @juanmontes1224
**********************************************************************************
***************/ CREATE DATABASE TIENDA_ALEX; CREATE USER
'TIENDA_ALEX'@'localhost' IDENTIFIED BY 'alexander'; GRANT ALL PRIVILEGES ON
TIENDA_ALEX.* TO 'TIENDA_ALEX'@'localhost'; """ and then the orchestrator: """
/**********************************************************************************
************** Description: sql script to orchestrate the database (create indexes, jobs, procedures,
references, sequences, tables and populate the database to test) author: Andres Felipe Wilches Torres
@AndresFWilT Date: 14/05/2023 Client: Tienda colchas - Alex @copyright: @AndresFWilT -
@juanmontes1224
**********************************************************************************
***************/ -- ORCHESTRATOR INITIALIZATION -- Set the default database USE
TIENDA_ALEX; -- ORCHESTRATOR -- Truncate the database SELECT 'Truncating Database:
Tienda colchas alex'; source ./database/truncate/truncateSchema.sql; -- Create tables SELECT
'Creating tables of Database: Tienda colchas alex'; source ./database/tables/1-table-orchestrator.sql; --
Create indexes (primary keys and foreign keys) SELECT 'Creating indexes (primary keys and foreign
keys index) of Database: Tienda colchas alex'; source ./indexes/2-index-orchestrator.sql; -- Create
references (constraints foreign keys) SELECT 'Creating references (constraints foreign keys) of
Database: Tienda colchas alex'; source ./references/3-reference-orchestrator.sql; -- Create sequences
(auto-increments) SELECT 'Creating sequences (auto-increments) of Database: Tienda colchas alex';
source ./sequences/4-sequence-orchestrator.sql; -- Create procedures SELECT 'Creating procedures of
Database: Tienda colchas alex'; source ./procedures/5-procedure-orchestrator.sql; -- Create jobs
(events) SELECT 'Creating jobs (events) of Database: Tienda colchas alex'; source ./jobs/6-job-
orchestrator.sql; """ what is wrong, counting with the following error: """ 2023-09-06 20:09:02
tienda_colchas_db | 2023-09-07 01:09:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL
Server 8.0.34-1.el8 started. 2023-09-06 20:09:02 tienda_colchas_db | 2023-09-07 01:09:02+00:00
[Note] [Entrypoint]: Switching to dedicated user 'mysql' 2023-09-06 20:09:02 tienda_colchas_db |
2023-09-07 01:09:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.34-1.el8
started. 2023-09-06 20:09:02 tienda_colchas_db | 2023-09-07 01:09:02+00:00 [Note] [Entrypoint]:
Initializing database files 2023-09

You might also like