NFA: How to recover from MySQL 8.4 corruption
search cancel

NFA: How to recover from MySQL 8.4 corruption

book

Article ID: 435049

calendar_today

Updated On:

Products

Network Observability Network Flow Analysis

Issue/Introduction

If your MySQL Server 8.4.x installation becomes corrupted, please carefully run through these steps. Please consult with Broadcom Support prior to ensure this procedure is required.

Environment

MySQL 8.4.x

Cause

If the table and innodb transaction logs both become currupt, a recovery is needed.

Resolution

  1. Rename D:/CA/NFA/MySQL/data/#innodb_redo to #innodb_redo_backup
  2. Open your D:/CA/NFA/MySQL/my.ini file using notepad ran as administrator.
  3. Under the [mysqld] section, add this line: innodb_force_recovery = 1
  4. Start CA MySQL service
  5. In admin CMD, change directories to do D:/CA/NFA/MySQL/bin
  6. Run: mysqldump -u root -p --all-databases --routines --events --triggers > D:\backup_alldata.sql
  7. Shut down CA MySQL Service.
  8. Rename your current D:/CA/NFA/MySQL/data folder to data_CORRUPT
  9. Create a brand new, empty folder named data.
  10. With MySQL still stopped run: mysqld --initialize-insecure --console
  11. Start CA MySQL
  12. Import your data: mysql -u root < D:\backup_alldata.sql
  13. Run: mysql -u root
  14. Run: FLUSH PRIVILEGES;