Issues

Select view

Select search mode

 

Mysql server not starting after Restore Backup

Not a Bug

Description

Command used for Backup : xtrabackup --user=Admin --password=Iltwat@1  --backup --databases=tejnmsdb --target-dir=/home/priyas/Testing/

 

Command used for Restore : 

  1. xtrabackup --user=root --password=Iltwat@1  --prepare --target-dir=/home/priyas/Testing/

  2. service mysqld stop

  3. rm -rf /var/lib/mysql/*

  4. xtrabackup --user=root --password=Iltwat@1  --copy-back --target-dir=/home/priyas/Testing/

  5. chown -R mysql:mysql /var/lib/mysql/*

  6. service mysqld start

 6th step is failing with error : 2024-03-23T08:55:10.788605Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'CREATE SCHEMA mysql DEFAULT COLLATE latin1_swedish_ci' failed with error code = 1049, error message = 'System schema directory does not exist.'.

 

mysql.log

2024-03-23T08:55:07.708180Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2024-03-23T08:55:07.708487Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31-commercial) initializing of server in progress as process 97196
2024-03-23T08:55:07.715185Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-03-23T08:55:07.715284Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2024-03-23T08:55:07.715491Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-03-23T08:55:07.715858Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-commercial) MySQL Enterprise Server - Commercial.
2024-03-23T08:55:08.366359Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2024-03-23T08:55:08.366463Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2024-03-23T08:55:08.366667Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31-commercial) starting as process 97198
2024-03-23T08:55:08.527702Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-23T08:55:10.782734Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-23T08:55:10.788605Z 1 [ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'CREATE SCHEMA mysql DEFAULT COLLATE latin1_swedish_ci' failed with error code = 1049, error message = 'System schema directory does not exist.'.
2024-03-23T08:55:10.789180Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2024-03-23T08:55:10.789322Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-03-23T08:55:11.546373Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31-commercial) MySQL Enterprise Server - Commercial.

 

xtrabackup_Info

uuid = 49121546-e8ef-11ee-96c2-aa0be13bb028
name =
tool_name = xtrabackup
tool_command = --user=root --password=... --backup --databases=tejnmsdb --target-dir=/home/priyas/Testing/
tool_version = 8.0.35-30
ibbackup_version = 8.0.35-30
server_version = 8.0.31-commercial
start_time = 2024-03-23 13:57:36
end_time = 2024-03-23 13:58:11
lock_time = 0
binlog_pos = filename 'binlog.000014', position '157'
innodb_from_lsn = 0
innodb_to_lsn = 185279338
partial = Y
incremental = N
format = file
compressed = N
encrypted = N

Environment

None

Details

Assignee

Reporter

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created March 23, 2024 at 10:41 AM
Updated March 30, 2024 at 6:19 PM
Resolved March 30, 2024 at 6:18 PM

Activity

Aaditya DubeyMarch 30, 2024 at 6:17 PM

Hi

Thank you for the report.
There are issues with the server and backup versions; please use the same backup version as the server. Please check

Thank you for connecting with the Percona.