I also tried these commands:
#sudo docker-compose down
#sudo docker-compose pull
#sudo docker-compose up -d
, but it didn’t solved the problem.
I checked the Log of docker logs services_global-db_1:
2021-04-16 11:09:28+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2021-04-16 11:09:29+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-04-16 11:09:29+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2021-04-16 11:09:29 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2021-04-16 11:09:29 0 [Warning] You need to use --log-bin to make --binlog-format work.
2021-04-16 11:09:29 0 [Note] InnoDB: Using Linux native AIO
2021-04-16 11:09:29 0 [Note] InnoDB: Uses event mutexes
2021-04-16 11:09:29 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-04-16 11:09:29 0 [Note] InnoDB: Number of pools: 1
2021-04-16 11:09:29 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2021-04-16 11:09:29 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-04-16 11:09:30 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-04-16 11:09:30 0 [Note] InnoDB: Completed initialization of buffer pool
2021-04-16 11:09:30 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955232 was in the XA prepared state.
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955166 was in the XA prepared state.
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955167 was in the XA prepared state.
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955173 was in the XA prepared state.
2021-04-16 11:09:30 0 [Note] InnoDB: 4 transaction(s) which must be rolled back or cleaned up in total 0 row operations to undo
2021-04-16 11:09:30 0 [Note] InnoDB: Trx id counter is 955233
2021-04-16 11:09:30 0 [Note] InnoDB: 128 rollback segments are active.
2021-04-16 11:09:30 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-04-16 11:09:30 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-04-16 11:09:30 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-04-16 11:09:30 0 [Note] InnoDB: 10.5.4 started; log sequence number 3046186820; transaction id 955235
2021-04-16 11:09:30 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-04-16 11:09:30 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-04-16 11:09:30 0 [Note] InnoDB: Buffer pool(s) load completed at 210416 11:09:30
2021-04-16 11:09:30 0 [Note] InnoDB: Starting in background the rollback of recovered transactions
2021-04-16 11:09:30 0 [Note] InnoDB: Starting recovery for XA transactions...
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955167 in prepared state after recovery
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction contains changes to 1 rows
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955232 in prepared state after recovery
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction contains changes to 1 rows
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955173 in prepared state after recovery
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction contains changes to 1 rows
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction 955166 in prepared state after recovery
2021-04-16 11:09:30 0 [Note] InnoDB: Transaction contains changes to 1 rows
2021-04-16 11:09:30 0 [Note] InnoDB: 4 transactions in prepared state after recovery
2021-04-16 11:09:30 0 [Note] Found 4 prepared transaction(s) in InnoDB
2021-04-16 11:09:30 0 [ERROR] Found 4 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
2021-04-16 11:09:30 0 [ERROR] Aborting
then attempted to manually run the MariaDB container with
docker run -it --rm --entrypoint /bin/bash easyengine/mariadb:v4.1.3
‘mysqld_safe --tc-heuristic-recover=COMMIT’
It gave me this result:
root@9bbf5a8f4354:/# mysqld_safe --tc-heuristic-recover=COMMIT
210416 11:13:26 mysqld_safe Logging to syslog.
210416 11:13:26 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
But still I am getting Error establishing a database connection