mysql version  8.4 LTS

  • 8.4 변동사항 많아서 보류
  • 8.0.4 로 uprade
https://dev.mysql.com/blog-archive/introducing-mysql-innovation-and-long-term-support-lts-versions/

 

한대의 인스턴스 Minor Upgrade 순서

- MySQL 셧다운 → 엔진파일 덮어쓰기(변경) → MySQL 서버(mysqld) 시작 → MySQL upgrade 실행
- 업그레이드 시 mysqld vs mysql_upgrade
실제 업그레이드는 두가지 단계로 나뉘어서 처리 ( 1단계: mysqld, 2단계 : mysql_upgrade)

 

순서

 

  • mysql 8,0.4 download & 압축해제ll
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.40-linux-glibc2.28-x86_64.tar.xz
sudo su
tar -xvf mysql-8.0.40-linux-glibc2.28-x86_64.tar.xz -C /usr/local​
  • 심볼릭 링크  해재 후 재설정
cd /usr/local
unlink mysql
ln -s mysql-8.0.40-linux-glibc2.28-x86_64 mysql​

 

  • mysql 중지
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
  • upgrade 수행
/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf &


업그레이드 프로그램 
8.0.16 미만 : mysql_upgrade
8.0.16 이상 : mysqld

로그 확인
2024-12-10T10:50:44.469133-00:00 4 [System] [MY-013381] [Server] Server upgrade from '80023' to '80200' started.
2024-12-10T10:50:51.334428-00:00 4 [System] [MY-013381] [Server] Server upgrade from '80023' to '80200' completed.
  • my.cnf 변경
expire_logs_days=7
-> binlog_expire_logs_seconds=604800
  • mysqlcheck
 /usr/local/mysql/bin/mysqlcheck -u root -p --all-databases --check-upgrade​
  • version 확인
SELECT @@version​

'MySQL (Aurora) > Troubleshooting' 카테고리의 다른 글

메모리 Resize 장애 (MHA)  (3) 2024.09.25
Mysql 5.7 Online DDL varchar column size변경  (1) 2024.09.03

MHA 구성으로 메모리 Resize 작업(재부팅 필요) 으로 장애 발생

  • 작업 시나리오

       0) MHA 세팅 확인

       1) Standby 메모리 Resize

       2) Online Failover 

       3) 구 Master 메모리 Resize

      

  • 장애 포인트

        Online Failover 이후 API가 VIP로 접속 안되는 현상 발생

  • 기존 Case

        기존에 Driver 버전 이슈라던지 다른 이슈일경우에는 API 세션이 있었는데 이 경우에는 세션이 한개도 안보임

        처음 발생한 Case

  • 원인 파악

        네트워크 작업으로 인한 방화벽이 막힌걸로 의심  ( 세션이 한개도없음)

  •  해결

        allowed_rule 이 빠진걸로 확인

        

 

'MySQL (Aurora) > Troubleshooting' 카테고리의 다른 글

mysql minor version upgrade  (0) 2024.12.12
Mysql 5.7 Online DDL varchar column size변경  (1) 2024.09.03

https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html

 

MySQL :: MySQL 5.7 Reference Manual :: 14.13.1 Online DDL Operations

14.13.1 Online DDL Operations Online support details, syntax examples, and usage notes for DDL operations are provided under the following topics in this section. The following table provides an overview of online DDL support for index operations. An aste

dev.mysql.com

 

The number of length bytes required by a VARCHAR column must remain the same. For VARCHAR columns of 0 to 255 bytes in size, one length byte is required to encode the value. For VARCHAR columns of 256 bytes in size or more, two length bytes are required. As a result, in-place ALTER TABLE only supports increasing VARCHAR column size from 0 to 255 bytes, or from 256 bytes to a greater size. In-place ALTER TABLE does not support increasing the size of a VARCHAR column from less than 256 bytes to a size equal to or greater than 256 bytes. In this case, the number of required length bytes changes from 1 to 2, which is only supported by a table copy (ALGORITHM=COPY). For example, attempting to change VARCHAR column size for a single byte character set from VARCHAR(255) to VARCHAR(256) using in-place ALTER TABLE returns this error:

 

칼럼길이가 256 byte 미만에서만  ALGORITHM=INPLACE 가능

그러나 utf8mb4 타입은 문자 1개당 4byte를 사용하므로 VARCHAR(63) 까지만 가능

 

'MySQL (Aurora) > Troubleshooting' 카테고리의 다른 글

mysql minor version upgrade  (0) 2024.12.12
메모리 Resize 장애 (MHA)  (3) 2024.09.25

+ Recent posts