I'm starting mysql
server using docker-compose
here is my docker-compose.yml
file:
version: "3.9"
services:
mysqldb:
image: mysql:8.0
container_name: mysqlcontainer
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/0_init.sql
- C:/Users/crisp/OneDrive/Desktop/html/database:/var/lib/mysql
ports:
- 8080:3306
expose:
- 8080
environment:
MYSQL_DATABASE: todos
MYSQL_USER: admin
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
SERVICE_TAGS: dev
SERVICE_NAME: mysqldb
networks:
- internalnet
networks:
internalnet:
driver: bridge
Now when i use the ps
docker command here is what i'm getting. The status is always Restarting
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6f8053143edf mysql:8.0 "docker-entrypoint.s…" 14 seconds ago Restarting (1) 1 second ago mysqlcontainer
If i try to debug using the logs
command on the container here are the logs I'm getting
2022-08-03 06:13:31 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:13:31 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:13:31 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:13:32.094297Z 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.
2022-08-03T06:13:32.108996Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:13:32.109026Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:13:32.122288Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:13:32.235605Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:13:32.929506Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:13:33.170552Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:13:33.170867Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:13:33.171051Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:13:33.172827Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:13:37 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:13:37 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:13:37 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:13:37.902864Z 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.
2022-08-03T06:13:37.916272Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:13:37.916302Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:13:37.929765Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:13:37.974966Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:13:38.676248Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:13:38.959483Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:13:38.959809Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:13:38.959870Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:13:38.961245Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:13:42 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:13:43 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:13:43 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:13:43.811176Z 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.
2022-08-03T06:13:43.826556Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:13:43.826611Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:13:43.846354Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:13:43.918855Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:13:44.772517Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:13:45.021113Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:13:45.021339Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:13:45.021415Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:13:45.023388Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:13:48 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:13:49 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:13:49 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:13:49.826617Z 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.
2022-08-03T06:13:49.839972Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:13:49.840130Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:13:49.854179Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:13:49.907502Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:13:50.701530Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:13:50.932839Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:13:50.933362Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:13:50.933448Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:13:50.934985Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:13:54 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:13:55 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:13:55 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:13:55.672533Z 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.
2022-08-03T06:13:55.686526Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:13:55.686557Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:13:55.700405Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:13:55.796139Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:13:56.593853Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:13:56.867322Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:13:56.867705Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:13:56.867752Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:13:56.869591Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:14:00 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:14:01 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:14:01 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:14:01.815025Z 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.
2022-08-03T06:14:01.827254Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:14:01.827284Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:14:01.838250Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:14:01.929735Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:14:02.836305Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:14:03.051822Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:14:03.052113Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:14:03.052150Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:14:03.053717Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:14:08 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:14:09 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:14:09 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:14:09.708213Z 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.
2022-08-03T06:14:09.718157Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:14:09.718187Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:14:09.728521Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:14:09.785854Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:14:10.556984Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:14:10.847891Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:14:10.848129Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:14:10.848165Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:14:10.849647Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:14:19 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:14:20 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:14:20 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:14:20.807168Z 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.
2022-08-03T06:14:20.819200Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:14:20.819231Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:14:20.829042Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:14:20.904475Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:14:21.745379Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:14:22.019620Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:14:22.020038Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:14:22.020116Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:14:22.021569Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:14:37 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:14:37 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:14:37 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:14:38.336495Z 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.
2022-08-03T06:14:38.346879Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:14:38.346910Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:14:38.355982Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:14:38.401038Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:14:39.439981Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:14:39.688466Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:14:39.688836Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:14:39.688881Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:14:39.690256Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:15:07 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:15:08 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:15:08 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:15:08.812491Z 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.
2022-08-03T06:15:08.824051Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:15:08.824083Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:15:08.835330Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:15:08.884074Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:15:09.598467Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:15:09.842765Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:15:09.843038Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:15:09.843109Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:15:09.844406Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:16:04 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:16:04 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:16:04 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:16:05.411826Z 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.
2022-08-03T06:16:05.422864Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:16:05.422895Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:16:05.437596Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:16:05.486536Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:16:06.235782Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:16:06.504590Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:16:06.504893Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:16:06.504965Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:16:06.506629Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:17:08 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:17:09 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:17:09 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:17:09.710388Z 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.
2022-08-03T06:17:09.725995Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:17:09.726036Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:17:09.738785Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:17:09.836029Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:17:10.640444Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:17:10.933443Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:17:10.933749Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:17:10.933812Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:17:10.935379Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:18:13 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:18:13 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:18:13 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:18:14.339873Z 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.
2022-08-03T06:18:14.355514Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:18:14.355556Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:18:14.367405Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:18:14.470999Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:18:15.216762Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:18:15.409546Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:18:15.409939Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:18:15.409979Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:18:15.412445Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:19:17 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:19:18 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:19:18 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:19:18.568091Z 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.
2022-08-03T06:19:18.582955Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:19:18.582987Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:19:18.596502Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:19:18.689140Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:19:19.579966Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:19:19.845619Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:19:19.845948Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:19:19.846001Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:19:19.847771Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:20:22 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:20:22 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:20:22 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:20:23.335838Z 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.
2022-08-03T06:20:23.346428Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:20:23.346459Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:20:23.358021Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:20:23.442383Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:20:24.334394Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:20:24.581742Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:20:24.582067Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:20:24.582145Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:20:24.583429Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2022-08-03 06:21:26 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2022-08-03 06:21:27 00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-08-03 06:21:27 00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2022-08-03T06:21:27.858128Z 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.
2022-08-03T06:21:27.871861Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-08-03T06:21:27.871891Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1
2022-08-03T06:21:27.886573Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-08-03T06:21:27.937394Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-03T06:21:28.781122Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-08-03T06:21:29.056997Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-03T06:21:29.057329Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-03T06:21:29.057392Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-03T06:21:29.058769Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
I don't know if these logs makes sense, but i can see that at the last line it says Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
.
When i try to connect to this mysql server on docker, here is the error that i'm getting.
"There was an error processing your request: connect ECONNREFUSED 127.0.0.1:8080"
Probably I'm missing something small here, what maybe possibly the cause of this.
CodePudding user response:
This is because the data folder was corrupt during the first installation or upgradation in the middle of the building or not properly closed.
Try this step.
Try to remove the docker image. List all images using
docker images
Remove the MySQL image
docker rmi imagename
Don't forget to remove the docker volume
docker volume rm volumename
Also, go to your directory C:/Users/crisp/OneDrive/Desktop/html/database
and remove the folder.
For Remove unused container use
docker system prune -a
Then try docker-compose up
for debugging.
If no errors, you could try docker-compose up -d
.
CodePudding user response:
The error in your output is:
2022-08-03T06:21:28.781122Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
Don't mount a Windows folder into the Linux container for a mysql data store:
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/0_init.sql
- C:/Users/crisp/OneDrive/Desktop/html/database:/var/lib/mysql
Use a named volume so the file system is local to the VM running Docker
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/0_init.sql
- todo_db:/var/lib/mysql
volumes:
todo_db: {}
When you do this the database will go back to an initial blank state. Restore the database from a backup if there was something important in there.