2.9. Migrating a MySQL instance from a previous RHEL version to MySQL 8.4 on RHEL 10


RHEL 10 provides MySQL 8.4. If you run a MySQL instance on a previous RHEL version, you can set up RHEL 10 on a new host and migrate the instance to it.

Prerequisites

  • You set up RHEL 10 on a new host.
  • You performed a file system backup of the MySQL instance on the RHEL 8 or RHEL 9 host.

Procedure

  1. Install the mysql8.4-server package:

    # dnf install mysql8.4-server
  2. Stop the service if it is already running:

    # systemctl stop mysqld.service
  3. Copy the content of the /var/lib/mysql/ directory from the previous host to the same location on the RHEL 10 host.
  4. Copy the configuration files from the previous host to the /etc/my.cnf.d/ directory, and ensure that the files includes only options valid for MySQL 8.4. For details, see the upstream documentation.
  5. Restore the SELinux context:

    # restorecon -rv /var/lib/mysql/
    # restorecon -rv /etc/my.cnf.d/
  6. Ensure the correct ownership of /var/lib/mysql/ and its subdirectories:

    # chown -R mysql:mysql /var/lib/mysql/
  7. Enable and start the mysqld service:

    # systemctl enable --now mysqld.service

    When the service starts, MySQL automatically checks, repairs, and updates internal tables.

Verification

  • Establish a connection to the MySQL server:

    # mysql -u root -p -h <hostname>
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동