내용으로 건너뛰기

Amazon RDS for MySQL DB 인스턴스에서 업그레이드 전 확인 실패를 해결하려면 어떻게 해야 합니까?

4분 분량
0

Amazon Relational Database Service(Amazon RDS) for MySQL DB 인스턴스를 업그레이드하려고 할 때 발생하는 업그레이드 전 확인 실패를 해결하고 싶습니다.

간략한 설명

Amazon RDS 및 Amazon Aurora MySQL 호환 버전에는 버전 업그레이드 중에 계획되지 않은 가동 중지 시간을 최소화하는 자동 사전 확인 기능이 있습니다. MySQL 버전 5.7에서 8.0으로 또는 8.0에서 8.4로 업그레이드할 때 사전 확인에서 업그레이드에 영향을 줄 수 있는 모든 데이터 비호환성을 감지합니다. DB 인스턴스에서 업그레이드 전 확인 실패가 발생하면 Amazon RDS for MySQL 버전 업그레이드가 중지됩니다. 그러면 Amazon RDS가 PrePatchCompatibility 로그 파일에 실패한 사전 확인의 세부 정보를 제공합니다.

문제를 식별하고 해결하려면 Amazon RDS 콘솔의 로그 및 이벤트에서 로그 파일을 확인하십시오.

MySQL 사전 확인에 대한 자세한 내용은 MySQL 웹 사이트의 업그레이드 검사기 유틸리티를 참조하십시오.

해결 방법

참고: AWS Command Line Interface(AWS CLI) 명령을 실행할 때 오류가 발생하면 AWS CLI의 오류 해결을 참조하십시오. 또한 최신 AWS CLI 버전을 사용하고 있는지 확인하십시오.

업그레이드 전 확인 실패 메시지 검토

로그 파일을 보려면 다음 단계를 완료하십시오.

  1. Amazon RDS 콘솔을 엽니다.
  2. 탐색 창에서 데이터베이스를 선택한 다음, 업그레이드하려는 데이터베이스를 선택합니다.
  3. 로그 및 이벤트 탭을 선택하고 최근 이벤트에서 PrePatchCompatibility를 검색합니다.
  4. PrePatchCompatibility 로그 파일을 검토한 다음, 문제를 해결합니다.
    참고: 대부분의 경우 로그 항목에는 비호환성 문제를 해결하는 방법에 대한 Amazon RDS for MySQL 설명서 링크가 포함되어 있습니다.

메시지에 특정 오류, 경고 및 알림 수준 메시지가 있는지 확인

PrePatchCompatibility 로그 파일에서 다음과 같은 사전 확인 메시지 중 하나를 받을 수 있습니다.

  • "Usage of old temporal type : ERROR"
  • "Usage of db objects with names conflicting with new reserved keywords : WARNING"
  • "Usage of utf8mb3 charset : NOTICE"
  • "Table names in the mysql schema conflicting with new tables in 8.0 : ERROR"
  • "Partitioned tables using engines with non native partitioning : ERROR"
  • "Foreign key constraint names longer than 64 characters : ERROR"
  • "Usage of obsolete MAXDB sql_mode flag : WARNING"
  • "Usage of obsolete sql_mode flags : NOTICE"
  • "ENUM/SET column definitions containing elements longer than 255 characters : ERROR"
  • "Usage of partitioned tables in shared tablespaces : ERROR"
  • "Circular directory references in tablespace data file paths : ERROR"
  • "Usage of removed functions : ERROR"
  • "Usage of removed GROUP BY ASC/DESC syntax : ERROR"
  • "Removed system variables for error logging to the system log configuration : ERROR"
  • "Removed system variables : ERROR"
  • "System variables with new default values : WARNING"
  • "Schema inconsistencies resulting from file removal or corruption : ERROR"
  • "Issues reported by 'check table x for upgrade' command : ERROR or WARNING or NOTICE"
  • "The definer column for mysql.events cannot be null or blank. : ERROR"
  • "Tables with dangling FULLTEXT index reference : ERROR"
  • "Routines with deprecated keywords in definition : ERROR"
  • "DB instance must have enough free disk space : ERROR"
  • "Creating indexes larger than 767 bytes on tables with redundant row format might cause the tables to be inaccessible. : WARNING"
  • "The tables with redundant row format can't have an index larger than 767 bytes. : ERROR"
  • "Column definition mismatch between InnoDB Data Dictionary and actual table definition. : ERROR"

ERROR 메시지가 표시되면 업그레이드를 시도하기 전에 오류를 수정하십시오. WARNING 메시지가 표시되면 Amazon RDS에서 치명적인 오류는 발견하지 못했지만 몇 가지 잠재적 문제를 발견한 것입니다.

NOTICE 메시지가 표시되면 Amazon RDS에서 알려진 호환성 오류나 문제를 발견하지 못한 것입니다. 그러나 오류 로그에서 NOTICE를 확인하십시오.

로그 파일 나열 및 데이터 다운로드

로그 파일을 나열하고 데이터를 다운로드하려면 다음 단계를 완료하십시오.

  1. describe-db-log-files AWS CLI 명령을 실행하여 로그 파일을 나열합니다.

    aws rds describe-db-log-files --db-instance-identifier DB_identifier --query '*[].[LogFileName]' --output text

    참고: DB_identifier를 로그 파일이 있는 데이터베이스의 이름으로 바꾸십시오.
    출력 예시:

    [root@ip-x-x-x-x ec2-user]# aws rds describe-db-log-files --db-instance-identifier testinstance --query '*[].[LogFileName]' --output text  
    PrePatchCompatibility.log  
    error/mysql-error.log  
    error/mysql-error-running.log  
    error/mysql-error-running.log.2023-05-06.3  
    error/mysql-error-running.log.2023-05-09.4  
    error/mysql-error-running.log.2023-05-10.3  
    error/mysql-error-running.log.2023-05-12.19  
    mysqlUpgrade
  2. download-db-log-file-portion 명령을 실행하여 특정 로그 파일을 다운로드합니다.

    aws rds download-db-log-file-portion --db-instance-identifier DB_identifier \--log-file-name PrePatchCompatibility.log --starting-token 0 \--output text > <LogFileName to save a copy>

    참고: DB_identifier를 로그 파일이 있는 데이터베이스의 이름으로 바꾸십시오.
    출력 예시:

    aws rds download-db-log-file-portion --db-instance-identifier testinstance \  
    --log-file-name PrePatchCompatibility.log --starting-token 0 \  
    --output text > PrePatchCompatibilityCopy.log

관련 정보

MySQL 웹 사이트의 MySQL 8.0으로 업그레이드하시겠습니까? 알아야 할 사항은 다음과 같습니다.

MySQL 웹 사이트의 업그레이드를 위한 설치 준비