업그레이드 후 mysql을 시작할 수 없습니다

업그레이드 후 mysql을 시작할 수 없습니다

좋아, 이게 나를 미치게 만들고 있어. 우분투 20.04.5 LTS(WSL)

충돌이 발생하고 mysql을 업그레이드했는데 이제 시작되지 않는다고 가정합니다.

2022-08-31T16:37:29.463168Z 1 [ERROR] [MY-012526] [InnoDB] Upgrade is not supported after a crash or shutdown with innodb_fast_shutdown = 2. This redo log was created with MySQL 8.0.28, and it appears logically non empty. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
2022-08-31T16:37:29.463211Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2022-08-31T16:37:29.842520Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-08-31T16:37:29.842925Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-08-31T16:37:29.842966Z 0 [ERROR] [MY-010119] [Server] Aborting

다시 실행 로그 ib_logfile0 및 ib_logfile1을 제거하려고 시도한 후 다음과 같은 결과를 얻습니다.

2022-09-03T16:56:05.188621Z 1 [ERROR] [MY-013862] [InnoDB] Neither found #innodb_redo subdirectory, nor ib_logfile* files in ./
2022-09-03T16:56:05.188663Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2022-09-03T16:56:05.672331Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-09-03T16:56:05.672561Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-03T16:56:05.672585Z 0 [ERROR] [MY-010119] [Server] Aborting

또한 ibdata1을 제거하려고 시도했는데

2022-09-03T17:20:34.205872Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 2 in a file operation.
2022-09-03T17:20:34.205907Z 1 [ERROR] [MY-012593] [InnoDB] The error means the system cannot find the path specified.
2022-09-03T17:20:34.205914Z 1 [ERROR] [MY-012594] [InnoDB] If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2022-09-03T17:20:34.205929Z 1 [ERROR] [MY-012646] [InnoDB] File ./ibdata1: 'open' returned OS error 71. Cannot continue operation
2022-09-03T17:20:34.205977Z 1 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.

8.0.28로 다운그레이드할 수도 있겠지만 확실히 복구할 수 있는 방법이 있을까요?

다양한 innodb_force_recovery 설정을 시도했지만 그 중 어느 것도 도움이 되지 않았습니다.

이 문제를 어떻게 해결하나요?

감사해요

답변1

mysql을 버전 8.0.30으로 업데이트할 때 비슷한 문제가 발생했습니다. #innodb_redo 폴더를 생성하여 해결했습니다.

cd /var/lib/mysql

mkdir #innodb_redo

chown mysql:mysql #innodb_redo

systemctl start mysql

답변2

하지만 "#"이 불법 문자인 경우 #innodb_redo를 어떻게 만들었나요? "Missing Operand" 메시지가 표시되고 Fedora 39에서 생성할 수 없습니다. – user3158591

vuser@fedora39-ssd-2TB:~$ cd /var/lib/mysql

vuser@fedora39-ssd-2TB:/var/lib/mysql$ sudo mkdir '#innodb_redo'

vuser@fedora39-ssd-2TB:/var/lib/mysql$ sudo chown mysql:mysql' #innodb_redo'

vuser@fedora39-ssd-2TB:/var/lib/mysql$ sudo service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service

관련 정보