Error: Can't initiate database recovery, running in read-only-mode

I’m getting error in checking xtrabackup status on both master and slave.
Is this really an error? If yes how to fix it?

xtrabackup --user=root --stats

xtrabackup version 8.0.35-30 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 6beb4b49)

2024-02-13T14:38:27.236139-00:00 0 [Note] [MY-011825] [Xtrabackup] cd to /var/lib/mysql

2024-02-13T14:38:27.236537-00:00 0 [Note] [MY-011825] [Xtrabackup] inititialize_service_handles suceeded

2024-02-13T14:38:27.236947-00:00 0 [Note] [MY-011825] [Xtrabackup] using the following InnoDB configuration:

2024-02-13T14:38:27.236963-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_home_dir = .

2024-02-13T14:38:27.236977-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_file_path = ibdata1:10M:autoextend

2024-02-13T14:38:27.237017-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_group_home_dir = .

2024-02-13T14:38:27.237035-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_files_in_group = 2

2024-02-13T14:38:27.237050-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_file_size = 50331648

2024-02-13T14:38:27.237122-00:00 0 [Note] [MY-011825] [Xtrabackup] Starting ‘read-only’ InnoDB instance to gather index statistics.

2024-02-13T14:38:27.237138-00:00 0 [Note] [MY-011825] [Xtrabackup] Using 104857600 bytes for buffer pool (set by --use-memory parameter)

2024-02-13T14:38:27.237171-00:00 0 [Note] [MY-012932] [InnoDB] PUNCH HOLE support available

2024-02-13T14:38:27.237193-00:00 0 [Note] [MY-012944] [InnoDB] Uses event mutexes

2024-02-13T14:38:27.237207-00:00 0 [Note] [MY-012945] [InnoDB] GCC builtin __atomic_thread_fence() is used for memory barrier

2024-02-13T14:38:27.237220-00:00 0 [Note] [MY-012948] [InnoDB] Compressed tables use zlib 1.2.13

2024-02-13T14:38:27.237500-00:00 0 [Note] [MY-012951] [InnoDB] Using software crc32.

2024-02-13T14:38:27.237926-00:00 0 [Note] [MY-012203] [InnoDB] Directories to scan ‘./’

2024-02-13T14:38:27.237991-00:00 0 [Note] [MY-012204] [InnoDB] Scanning ‘./’

2024-02-13T14:38:27.478737-00:00 0 [Note] [MY-012208] [InnoDB] Completed space ID check of 628 files.

2024-02-13T14:38:27.479267-00:00 0 [Note] [MY-012955] [InnoDB] Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M

2024-02-13T14:38:27.491392-00:00 0 [Note] [MY-012957] [InnoDB] Completed initialization of buffer pool

2024-02-13T14:38:27.492849-00:00 0 [Note] [MY-012953] [InnoDB] Disabling background ibuf IO read threads.

2024-02-13T14:38:27.493736-00:00 0 [Note] [MY-011951] [InnoDB] page_cleaner coordinator priority: -20

2024-02-13T14:38:27.495180-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20

2024-02-13T14:38:27.496001-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20

2024-02-13T14:38:27.496079-00:00 0 [Note] [MY-011954] [InnoDB] page_cleaner worker priority: -20

2024-02-13T14:38:27.575516-00:00 0 [Note] [MY-013883] [InnoDB] The latest found checkpoint is at lsn = 1840676226 in redo log file ./#innodb_redo/#ib_redo15.

2024-02-13T14:38:27.575607-00:00 0 [Note] [MY-012560] [InnoDB] The log sequence number 1790065686 in the system tablespace does not match the log sequence number 1840676226 in the redo log files!

2024-02-13T14:38:27.575626-00:00 0 [ERROR] [MY-012561] [InnoDB] Can't initiate database recovery, running in read-only-mode.
2024-02-13T14:38:27.575642-00:00 0 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.

2024-02-13T14:38:27.576560-00:00 0 [ERROR] [MY-011825] [Xtrabackup] innodb_init(): Error occured

Hello @roger, can you please explain what you are trying to do here? Can you also confirm you are using PXB 8.0.35 against a running 8.0.35 Percona Server?

I’ve just setup replication using xtrabackup. I wanted to check log to find out if it is all working properly.

I’m not running any Percona server, I’m just using Xtrabackup to replicate mysql (mysql server)

Xtrabackup is not the tool for checking replication status. PXB is a backup/restore tool; nothing more. Once you’ve taken the backup and restored it to a new server, all replication configuration and status are found inside MySQL.

After you have started MySQL on the replica, you still need to configure it with CHANGE REPLICATION SOURCE ... and SHOW REPLICA STATUS\G to see the current state.

1 Like

Thanks for clarification.